Skip to content

[gh-pages] Hand-craft API templates for leaner output #1808

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions api/alternative-schema.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
---
---
{{ site.alternative-schema | jsonify }}

{
{% for page in site.alternative-schema %}"{{ page.slug }}": {
"slug": "{{ page.slug }}",
"title": "{{ page.title }}",
"issue": "{{ page.issue }}",
"description": "{{ page.description }}",
"owner": "{{ page.owner }}"
}{% unless forloop.last %},{% endunless %}
{% endfor %}
}
12 changes: 10 additions & 2 deletions api/draft-feature.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
---
---
{{ site.draft-feature | jsonify }}

{
{% for page in site.draft-feature %}"{{ page.slug }}": {
"slug": "{{ page.slug }}",
"title": "{{ page.title }}",
"issue": "{{ page.issue }}",
"description": "{{ page.description }}",
"owner": "{{ page.owner }}"
}{% unless forloop.last %},{% endunless %}
{% endfor %}
}
14 changes: 12 additions & 2 deletions api/extension.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
---
---
{{ site.extension | jsonify }}

{
{% for page in site.extension %}"{{ page.slug }}": {
"slug": "{{ page.slug }}",
"title": "{{ page.title }}",
"issue": "{{ page.issue }}",
"description": "{{ page.description }}",
"owner": "{{ page.owner }}",
"objects": {{ page.objects | jsonify }},
"schema": {{ page.schema | jsonify }}
}{% unless forloop.last %},{% endunless %}
{% endfor %}
}
13 changes: 11 additions & 2 deletions api/format.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
---
---
{{ site.format | jsonify }}

{
{% for page in site.format %}"{{ page.slug }}": {
"slug": "{{ page.slug }}",
"title": "{{ page.title }}",
"issue": "{{ page.issue }}",
"description": "{{ page.description }}",
"owner": "{{ page.owner }}",
"base_type": "{{ page.base_type" }}"
}{% unless forloop.last %},{% endunless %}
{% endfor %}
}
6 changes: 4 additions & 2 deletions api/registries.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
---
{{ site.collections | jsonify }}

[
{% for collection in site.collections %}"{{ collection.slug }}"{% unless forloop.last %},{% endunless %}
{% endfor %}
]
2 changes: 1 addition & 1 deletion registries/_alternative-schema/jsonSchema.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
owner: darrel_miller
owner: darrelmiller
issue: 1532
description: JSON Schema
layout: default
Expand Down
2 changes: 1 addition & 1 deletion registries/_alternative-schema/xmlSchema.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
owner: darrel_miller
owner: darrelmiller
issue: 1532
description: xml Schema
layout: default
Expand Down
2 changes: 1 addition & 1 deletion registries/_draft-feature/alternativeSchema.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
owner: darrel_miller
owner: darrelmiller
issue: 1532
description: x-oas-draft-alternativeSchema

Expand Down
5 changes: 1 addition & 4 deletions registries/_extension/x-twitter.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
---
slug: x-twitter
name: x-twitter
owner: mike_ralphson
owner: MikeRalphson
issue:
description: Used to hold a reference to the API provider's Twitter account.
schema:
type: string
objects: [ "contactObject" ]

layout: default
---

Expand Down
5 changes: 3 additions & 2 deletions registries/_format/commonmark.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
---
slug: commonmark
owner: MikeRalphson
description: commonmark-formatted text
base_type: string
issue:
layout: default
---

# <a href="..">{{ page.collection }}</a>

## {{ page.slug }} - {{ page.description }}

Base type: `string`.
Base type: `{{ page.base_type }}`.

The `{{page.slug}}` format represents [CommonMark](https://commonmark.org/) formatted text.

Expand Down
4 changes: 3 additions & 1 deletion registries/_format/html.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
---
owner: MikeRalphson
description: HTML-formatted text
base_type: string
issue:
layout: default
---

# <a href="..">{{ page.collection }}</a>

## {{ page.slug }} - {{ page.description }}

Base type: `string`.
Base type: `{{ page.base_type}}`.

The `{{page.slug}}` format represents HTML-formatted text.

Expand Down
3 changes: 2 additions & 1 deletion registries/_format/int8.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
owner: MikeRalphson
issue: 845
description: signed 8-bit integer
base_type: number
layout: default
---

# <a href="..">{{ page.collection }}</a>

## {{ page.slug }} - {{ page.description }}

Base type: `number`.
Base type: `{{ page.base_type }}`.

The `{{page.slug}}` format represents a signed 8-bit integer, with the range -128 to 127.

Expand Down
3 changes: 2 additions & 1 deletion registries/_format/uint8.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
owner: MikeRalphson
issue: 845
description: unsigned 8-bit integer
base_type: number
layout: default
---

# <a href="..">{{ page.collection }}</a>

## {{ page.slug }} - {{ page.description }}

Base type: `number`.
Base type: `{{ page.base_type }}`.

The `{{page.slug}}` format represents an unsigned 8-bit integer, with the range 0 to 255.

Expand Down