News for hackers. Stuff that matters.
Re:The Open API Initiative by porpoisemonkey on Friday March 11, 2016 @05:59PM (#11270163)
There does appear to be an examples section in the project repository

https://github.com/OAI/OpenAPI-Specification/tree/master/exa...

Re:The Open API Initiative by palakchokshi on Friday March 11, 2016 @06:48PM (#11270455)
I believe he meant a way to put examples in the spec itself. I believe they have a client SDK that will consume the API spec and allow you to make requests and see responses.
Re:The Open API Initiative by porpoisemonkey on Friday March 11, 2016 @07:26PM (#11270606)
Ah I see. The OpenAPI specification for the interface description language and the auto-generation tools are actually two separate entities so I'm not sure it would make sense that they put examples for a specific auto-generation tool in the official OpenAPI repository.

It seems like the best supported tool for generating client and server stubs is Swagger Codegen. Version 2.1.2 seems to support the OpenAPI 2.0 draft spec.

http://swagger.io/swagger-codegen/

http://swagger.io/getting-started/

Re:The Open API Initiative by whatnotests on Saturday March 12, 2016 @01:08AM (#11271604)
Yes, I mean documentation in general.

It's fine to just show a long list of method signatures and class hierarchies, but a working code sample is the picture that's worth a thousand words.

Re:The Open API Initiative by progx on Saturday March 12, 2016 @05:08AM (#11272215)
Re:The Open API Initiative by whatnotests on Saturday March 12, 2016 @05:44PM (#11275048)
Very nice! I particularly like the ability to compare two different versions visually.