pyeve / eve-swagger

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

Additional openAPI fields #37

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.

(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)

hermannsblum commented 7 years ago

Whuups, I just saw that I committed the hide of hook functions also into this branch, sorry for that, will create new PR

otibsa commented 7 years ago

Could you also add tests for your changes?