openfoodfacts / openfoodfacts-server

Open Food Facts database, API server and web interface - 🐪🦋 Perl, CSS and JS coders welcome 😊 For helping in Python, see Robotoff or taxonomy-editor
http://openfoodfacts.github.io/openfoodfacts-server/
GNU Affero General Public License v3.0
660 stars 389 forks source link

Describe the new API with Swagger file to generate documentation #187

Open nicolasleger opened 8 years ago

nicolasleger commented 8 years ago
teolemon commented 8 years ago

@nicolasleger can you help on that ?

teolemon commented 8 years ago

https://github.com/jhthorsen/swagger2

nicolasleger commented 8 years ago

@teolemon Sorry I didn't have time right now, and not familiar with Perl. For speed, Swagger file can be manually written.

teolemon commented 8 years ago

So we need a decent knowledge of Perl to be able to generate it automatically.

ghost commented 6 years ago

My suggestion to tackle this:

This

As Swagger Codegen does not contain template files for generating a Perl Server, it would be a clever move for us to work on exactly that.
If we start creating a Swagger Codegen perl server generator now, we can make the generated server work exactly how we need it. There's an existing issue about that, suggesting a different server framework, but I think this choice could be discussed with the swagger codegen maintainers.

ghost commented 6 years ago

@teolemon What are your thoughts on that topic?

aleene commented 6 years ago

If this also allows to do a quality check on the api, it would be great.

ghost commented 6 years ago

the spec (left side) would be checked into git and we iterate on the API until it fit our needs. Any quality checks can then be done on this textual representation of the API. As server & client are generated from this spec, we have a guarantee that server & client both meet the specification and thus can properly communicate.

teolemon commented 5 years ago

Marina is working on this as part of Google's Season of Docs