api-specification-toolbox / toolbox

This is a toolbox for all of the leading API specifications, providing a community catalog of news, services, tooling, extensions, and other resources to support your adoption of leading API specifications.
http://api.specificationtoolbox.com/
Apache License 2.0
19 stars 7 forks source link

Add help for validating new _extensions #46

Open DavidBiesack opened 3 years ago

DavidBiesack commented 3 years ago

http://api.specificationtoolbox.com/extensions/ describes how to add new extensions using the APIs.json format, but it is not clear how one can validate that the _extensions/*.md files in a pull request to this toolbox repo are formatted correctly. (The yaml frontmatter does not render correctly in the GitHub view.)

DavidBiesack commented 3 years ago

Also note that although these source files use Markdown source with YAML frontmatter, the site does not convert Markdown within that frontmatter to HTML -- see http://api.specificationtoolbox.com/extensions/ for example and the ra Markdown that is not turned into links un the swaggerplusplus extensions, or for example http://api.specificationtoolbox.com/extensions/swaggerplusplus-x-callbacks/ whose rendering is

Define OpenAPI 3.x `callbacks` [Callback Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#callback-object) operation elements in an OpenAPI 2.0 API description document. This allows converting OpenAPI 2.0 to OpenAPI 3.0 for tools which work with OpenAPI 3.0.
                        {"callbacks":{"myCallback1":{"http://callback.example.com?transactionId={$request.body#/id}&email ={$request.body#/email}":{"post":{"requestBody":{"description":"Callback payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/callback1Payload"}}}},"responses":{"200":{"description":"Callback successfully processed and no retries will be performed"}}}}}}}

The example is not formatted either.