Hacker News new | ask | show | jobs
by Abundnce10 3941 days ago
Are any of those projects open source? I'm looking for an example Swagger YAML/JSON file that includes authentication.
1 comments

https://github.com/zalando-stups/pierone/blob/master/resourc...

PierOne is a Docker registry in Clojure with S3 backend and OAuth support. I wrote swagger1st[0] which is used there. Swagger supports authorization definitions via scopes. Besides that, you can only define required basic auth or API key usage for authentication but not for authorisation.

Swagger defines various places, where you can add own x-* attributes to fill in your own logic if swagger is not expressive enough.

[0] https://github.com/sarnowski/swagger1st

Awesome. Thanks for sharing!