From 3324562a4c1e75a1cc7da5d4f562dcb9f2f41d50 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Wed, 14 Aug 2024 16:42:30 +0200 Subject: [PATCH] Add pages for examples --- Gemfile.lock | 1 + _includes/example-api-description.md | 18 ++++++++++++++++++ examples/index.md | 9 +++++++++ examples/v3.0/api-with-examples.md | 13 +++++++++++++ examples/v3.0/callback-example.md | 13 +++++++++++++ examples/v3.0/link-example.md | 13 +++++++++++++ examples/v3.0/petstore-expanded.md | 13 +++++++++++++ examples/v3.0/petstore.md | 13 +++++++++++++ examples/v3.0/uspto.md | 13 +++++++++++++ examples/v3.1/non-oauth-scopes.md | 13 +++++++++++++ examples/v3.1/tictactoe.md | 13 +++++++++++++ examples/v3.1/webhook-example.md | 13 +++++++++++++ 12 files changed, 145 insertions(+) create mode 100644 _includes/example-api-description.md create mode 100644 examples/index.md create mode 100644 examples/v3.0/api-with-examples.md create mode 100644 examples/v3.0/callback-example.md create mode 100644 examples/v3.0/link-example.md create mode 100644 examples/v3.0/petstore-expanded.md create mode 100644 examples/v3.0/petstore.md create mode 100644 examples/v3.0/uspto.md create mode 100644 examples/v3.1/non-oauth-scopes.md create mode 100644 examples/v3.1/tictactoe.md create mode 100644 examples/v3.1/webhook-example.md diff --git a/Gemfile.lock b/Gemfile.lock index 3a00189..6148dc9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -77,6 +77,7 @@ GEM PLATFORMS arm64-darwin-21 + arm64-darwin-23 x86_64-darwin-23 x86_64-linux diff --git a/_includes/example-api-description.md b/_includes/example-api-description.md new file mode 100644 index 0000000..127144e --- /dev/null +++ b/_includes/example-api-description.md @@ -0,0 +1,18 @@ +# {{ include.name }} + +{% assign json_file = include.name | append: ".json" %} +{% assign yaml_file = include.name | append: ".yaml" %} + +{{ include.description }} + +## JSON + +```json +{% include_relative {{ json_file }} %} +``` + +## YAML + +```yaml +{% include_relative {{ yaml_file }} %} +``` diff --git a/examples/index.md b/examples/index.md new file mode 100644 index 0000000..de34a50 --- /dev/null +++ b/examples/index.md @@ -0,0 +1,9 @@ +--- +layout: default +title: Example API Descriptions +nav_order: 6 +has_children: true +has_toc: true +--- + +# Example API Descriptions diff --git a/examples/v3.0/api-with-examples.md b/examples/v3.0/api-with-examples.md new file mode 100644 index 0000000..073e9a2 --- /dev/null +++ b/examples/v3.0/api-with-examples.md @@ -0,0 +1,13 @@ +--- +layout: default +title: api-with-examples +parent: Example API Descriptions +--- + +{% comment %} +{% capture description %} +Insert description here, then remove comment tag above and endcomment tag below +{% endcapture %} +{% endcomment %} + +{% include example-api-description.md name=page.title description=description %} diff --git a/examples/v3.0/callback-example.md b/examples/v3.0/callback-example.md new file mode 100644 index 0000000..70deefd --- /dev/null +++ b/examples/v3.0/callback-example.md @@ -0,0 +1,13 @@ +--- +layout: default +title: callback-example +parent: Example API Descriptions +--- + +{% comment %} +{% capture description %} +Insert description here, then remove comment tag above and endcomment tag below +{% endcapture %} +{% endcomment %} + +{% include example-api-description.md name=page.title description=description %} diff --git a/examples/v3.0/link-example.md b/examples/v3.0/link-example.md new file mode 100644 index 0000000..9881ccc --- /dev/null +++ b/examples/v3.0/link-example.md @@ -0,0 +1,13 @@ +--- +layout: default +title: link-example +parent: Example API Descriptions +--- + +{% comment %} +{% capture description %} +Insert description here, then remove comment tag above and endcomment tag below +{% endcapture %} +{% endcomment %} + +{% include example-api-description.md name=page.title description=description %} diff --git a/examples/v3.0/petstore-expanded.md b/examples/v3.0/petstore-expanded.md new file mode 100644 index 0000000..62ef8e9 --- /dev/null +++ b/examples/v3.0/petstore-expanded.md @@ -0,0 +1,13 @@ +--- +layout: default +title: petstore-expanded +parent: Example API Descriptions +--- + +{% comment %} +{% capture description %} +Insert description here, then remove comment tag above and endcomment tag below +{% endcapture %} +{% endcomment %} + +{% include example-api-description.md name=page.title description=description %} diff --git a/examples/v3.0/petstore.md b/examples/v3.0/petstore.md new file mode 100644 index 0000000..e385167 --- /dev/null +++ b/examples/v3.0/petstore.md @@ -0,0 +1,13 @@ +--- +layout: default +title: petstore +parent: Example API Descriptions +--- + +{% comment %} +{% capture description %} +Insert description here, then remove comment tag above and endcomment tag below +{% endcapture %} +{% endcomment %} + +{% include example-api-description.md name=page.title description=description %} diff --git a/examples/v3.0/uspto.md b/examples/v3.0/uspto.md new file mode 100644 index 0000000..f5a5f50 --- /dev/null +++ b/examples/v3.0/uspto.md @@ -0,0 +1,13 @@ +--- +layout: default +title: uspto +parent: Example API Descriptions +--- + +{% comment %} +{% capture description %} +Insert description here, then remove comment tag above and endcomment tag below +{% endcapture %} +{% endcomment %} + +{% include example-api-description.md name=page.title description=description %} diff --git a/examples/v3.1/non-oauth-scopes.md b/examples/v3.1/non-oauth-scopes.md new file mode 100644 index 0000000..7b1cd8c --- /dev/null +++ b/examples/v3.1/non-oauth-scopes.md @@ -0,0 +1,13 @@ +--- +layout: default +title: non-oauth-scopes +parent: Example API Descriptions +--- + +{% comment %} +{% capture description %} +Insert description here, then remove comment tag above and endcomment tag below +{% endcapture %} +{% endcomment %} + +{% include example-api-description.md name=page.title description=description %} diff --git a/examples/v3.1/tictactoe.md b/examples/v3.1/tictactoe.md new file mode 100644 index 0000000..9d98f07 --- /dev/null +++ b/examples/v3.1/tictactoe.md @@ -0,0 +1,13 @@ +--- +layout: default +title: tictactoe +parent: Example API Descriptions +--- + +{% comment %} +{% capture description %} +Insert description here, then remove comment tag above and endcomment tag below +{% endcapture %} +{% endcomment %} + +{% include example-api-description.md name=page.title description=description %} diff --git a/examples/v3.1/webhook-example.md b/examples/v3.1/webhook-example.md new file mode 100644 index 0000000..c3ce2ed --- /dev/null +++ b/examples/v3.1/webhook-example.md @@ -0,0 +1,13 @@ +--- +layout: default +title: webhook-example +parent: Example API Descriptions +--- + +{% comment %} +{% capture description %} +Insert description here, then remove comment tag above and endcomment tag below +{% endcapture %} +{% endcomment %} + +{% include example-api-description.md name=page.title description=description %}