Versioning and Workflow in Swagger

2018-01-11 Thread 'Toe Dipper' via Swagger
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

Re: multi module swagger file setup similar to route handler setup

2018-01-11 Thread 'Toe Dipper' via Swagger
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:

Example of self-referential (circular reference) in Swagger?

2017-07-26 Thread 'Toe Dipper' via Swagger
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

Re: Why swagger editor errors indication system is so f%ing stupid?

2017-06-29 Thread 'Toe Dipper' via Swagger
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

Re: Gettting 401 error using below code in php

2017-06-29 Thread 'Toe Dipper' via Swagger
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

Re: How to specify a property can be null or a reference

2017-06-23 Thread 'Toe Dipper' via Swagger
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

Re: Swagger Docs in YAML & JSON?

2017-06-21 Thread 'Toe Dipper' via Swagger
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

Swagger Docs in YAML & JSON?

2017-06-21 Thread 'Toe Dipper' via Swagger
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

Re: Swagger does not like included JSON Schema object because of "$schema" and "id" properties

2017-06-15 Thread 'Toe Dipper' via Swagger
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

Swagger does not like included JSON Schema object because of "$schema" and "id" properties

2017-06-14 Thread 'Toe Dipper' via Swagger
>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": "

Re: Noob struggling to define a route...

2017-06-14 Thread 'Toe Dipper' via Swagger
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

Noob struggling to define a route...

2017-06-14 Thread 'Toe Dipper' via Swagger
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

Re: Better date/time types?

2017-06-14 Thread 'Toe Dipper' via Swagger
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

Re: POST Endpoint - How to give sample JSON body

2017-06-14 Thread 'Toe Dipper' via Swagger
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