pyeve / eve-swagger

Swagger extension for Eve-powered RESTful APIs
http://python-eve.org
Other
154 stars 43 forks source link

Additional openAPI fields #38

Closed hermannsblum closed 7 years ago

hermannsblum commented 7 years ago

the swagger 2.0 or openAPI specification also supports readOnly (which is eve readonly) and pattern (which is eve/cerberus regex).

This pullrequest adds them to the eve-swagger output.

Concerning testing: As I understand eve-swagger tests right now actually don't test all of openAPIs validity. I therefore just added the new schema keys into the test-settings.

(However, _id will still not be reported as readonly as it is a datarelation and openAPI does not support $ref and readOnly together. The fix for this in my fork is that I don't report the id as a relation, but this is probably not the perfect way to go)

nicolaiarocci commented 7 years ago

Merged after rebase, see: https://github.com/nicolaiarocci/eve-swagger/commit/91f3a471e2f4756efde39e6b4db7d55237168941