Does anyone have recommendations for a day-to-day workflow for building and
maintaining a multi-file swagger document that supports multiple versions
of an API?
It's possible to create a new swagger file for each version (e.g. by
changing the base path), but that may make it difficult to re-use
I discussed this a bit in a blog
post:
https://blog.codeship.com/json-schemas-role-in-building-and-deploying-your-api/
I put together a sample repo for
it: https://github.com/fireproofsocks/swagger-multifile-examples
On Thursday, August 31, 2017 at 5:30:48 AM UTC-7, ch...@unomicedge.com
wrote:
I'm working on defining a schema for defining hierarchical menu items. The
rub is that each object can have children that are the same type of object.
This self-referential structure is a bit tricky, however. Does anyone
have an example of how to do this in a swagger file?
In a JSON Schema f
I can share your frustration, and I know people are working on improving
the online editor, but I don't know any of the specifics.
As an alternative to the online editor, I've found the command-line
validator useful: https://www.npmjs.com/package/swagger-cli
Its validation results are not the
This seems like more of an application error than anything to do with
Swagger. Probably a good place to start debugging would be examining the
application's error logs.
--
Please NOTE: This electronic message, including any attachments, may
include privileged, confidential and/or inside infor
I am also curious for support for "nullable" fields. Support for "oneOf" and
"anyOf" is not quite the same thing. In JSON Schema, the "type" field can
be an array, e.g. to indicate a nullable field:
// In JSON Schema
{
"type": ["string", "null"]
}
// Or, using anyOf
{
"anyOf":[
{"t
Are these docs not in YAML?
http://swagger.io/docs/specification/adding-examples/
http://swagger.io/docs/specification/describing-parameters/
etc?
--
Please NOTE: This electronic message, including any attachments, may
include privileged, confidential and/or inside information owned by Leaf
One of the most helpful features in API documentation has been the
inclusion of tabs to flip between different languages that demonstrate a
certain feature. E.g. click on "PHP" to see an example of the PHP code to
achieve a certain result, click on "Python" to see it in Python, etc.
It would
Thanks for your response. I know there's a pinned post re v3 of the
specification, but is there a draft available to look at? I'm very curious
as to whether Swagger will fully support the JSON Schema spec in the
future. That limitation alone could be the deciding factor between Swagger
and R
>From my understanding of JSON Schema, a schema document can (and should)
include a parameter for the version of its schema and an id that uniquely
identifies the definition, e.g.
{
"$schema": "http://json-schema.org/draft-04/schema#";,
"id": "mydef",
"type": "object",
"title": "
Thank you! That did it!
--
Please NOTE: This electronic message, including any attachments, may
include privileged, confidential and/or inside information owned by Leaf
Group. Any distribution or use of this communication by anyone other than
the intended recipient(s) is strictly prohibited a
I'm evaluating swagger and I'm having trouble defining a simple route in my
app. It's something like "/x/y" where there requesting "/x" by itself is
not considered a valid route. I've been trying the online swagger editor,
but I can't figure out how to resolve the error:
Schema error at path
JSON Schema does allow for a "date-time" string format, but it's not a very
common one (even though its an RFC standard), e.g. sample JSON Schema
definition:
{
"type": "string",
"format": "date-time"
}
See
https://spacetelescope.github.io/understanding-json-schema/reference/string.htm
A schema isn't the same as an example body (although you could use the JSON
schema's "default" property to include an example body). I think the OP
wanted to know how to include a full sample body,
e.g. http://swagger.io/docs/specification/adding-examples/
--
Please NOTE: This electronic mess
14 matches
Mail list logo