Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This is a draft proposal for RESTful API Design Specification within ONAP. This draft has not be approved by TSC yet.

Documentation Specification(Swagger)

  • All the RESTful API must follow Swagger Specification for API documentation: http://swagger.io/specification
  • The ONAP-Components must provide swagger files for its RESTful API definitions, there are two possible approaches.
    • The developers write the Swagger file, then use CI system to generate the stub codes for implementation.
    • The developers write the Swagger annotation in the source codeI, then use CI system to generate the Swagger file.
  • The Swagger file should be placed under the base url of the service so the API definition could be discovered by clients or management tools at runtime. 
    For example, if the base url of peststore service is /api/petstore/v1/, the URL of swagger file should be /api/petstore/v1/Swagger.json

...