lsedlar / cts

Forked from cts 5 years ago
Clone

312d0b0 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
    
    CTSAPI and TagsAPI views are split to two views due to issue
    https://github.com/marshmallow-code/apispec-webframeworks/issues/14
    
    Run following command to generate openapispec.json
    
        cts-manager openapispec > cts/static/openapispec.json
    
    When running cts in dev mode via `./start_cts_from_here`, the api doc is
    available at http://127.0.0.1:5005/api/1
    
    When running cts in production such as via httpd, make sure serving
    `openapispec.json` at `/static/openapispec.json` via httpd.
    
    JIRA: RHELCMP-9746
    
        
file modified
+9 -2
file modified
+8 -0
file modified
+745 -245
file modified
+3 -0