Skip to content
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

Add swagger.io provider to microservices to document our web services #205

Closed
whikloj opened this issue Apr 25, 2016 · 7 comments
Closed

Comments

@whikloj
Copy link
Member

whikloj commented Apr 25, 2016

Using swagger.io allows us to build API documentation with code annotations. Swagger is part of OpenAPI which continues our adoption of good standards.

For Silex we can use the silex-swagger-provider to automatically publish API documentation.

@ruebot
Copy link
Member

ruebot commented Apr 25, 2016

See also #120

@whikloj
Copy link
Member Author

whikloj commented Apr 25, 2016

Based on the fact that the silex-swagger-provider is not supporting Swagger 2 I think we should look at implementing zircote/swagger-php instead.

@ruebot
Copy link
Member

ruebot commented Apr 25, 2016

@whikloj should we be concerned with any of the rationale provided there why the silex-swagger-provider is not supporting Swagger 2?

@whikloj
Copy link
Member Author

whikloj commented Apr 26, 2016

I'm not sure I fully understood his rationale at first so I played with his code and was able to get it working with Swagger 2. However this lead to a larger problem which is that at present OpenAPI/Swagger does not support content-negotiation for parameter definition.

What this means is that we can't define that a POST to /islandora/resource should expect a body of RDF if the mime-type is text/xml or application/rdf+xml or application/ld+json, but ALSO expect a body of a binary if the mime-type is image/tiff or video/mp4.

Soooooooooo... going back I read the articles and had a look at the JSON Schema documentation. Its interesting just not sure if we have the time to generate all the JSON schemas?

@ruebot
Copy link
Member

ruebot commented Apr 26, 2016

...inteeeeeeeeeeeeeeeeeeeeeeeeresting.

@whikloj
Copy link
Member Author

whikloj commented Apr 26, 2016

Yes, so that ticket with OpenAPI seems to indicate that this should be coming in the next version. Question is when will that be?

@whikloj
Copy link
Member Author

whikloj commented Apr 26, 2016

However....doesn't it look nice?!
claw-openapi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants