jkaluza / odcs

Forked from odcs 6 years ago
Clone

ca3eb1c Write API docs following OpenAPI spec

Authored and Committed by hlin 2 years ago
    Write API docs following OpenAPI spec
    
    - Write docs in docstring following OpenAPI spec https://www.openapis.org/
    - Generate API specification using https://pypi.org/project/apispec/
    - Render API specification using https://github.com/Redocly/redoc
    
    ODCSAPI view is splitted to two views (ComposesListAPI and
    ComposeDetailAPI) due to issue
    https://github.com/marshmallow-code/apispec-webframeworks/issues/14
    
    Run following command to generate openapispec.json
    
        odcs-manager openapispec > server/odcs/server/static/openapispec.json
    
    When running odcs in dev mode via `./start_odcs_from_here`, the api doc is
    available at http://127.0.0.1:5005/api/1
    
    When running odcs in production such as via httpd, make sure serving
    `openapispec.json` at `/static/openapispec.json` via httpd.
    
    JIRA: RHELCMP-9831
    Signed-off-by: Haibo Lin <hlin@redhat.com>
    
        
file modified
+1 -0
file modified
+4 -0
file modified
+5 -0
file modified
+9 -5
file modified
+8 -0
empty file added
file modified
+885 -317
file modified
+3 -0
file modified
+1 -1