reanahub / reana-commons

REANA common utilities and schemas
https://reana-commons.readthedocs.io/
MIT License
2 stars 39 forks source link

CLI: generate OpenAPI specs for generic components #76

Open diegodelemos opened 5 years ago

diegodelemos commented 5 years ago

Stemmed from https://github.com/reanahub/reana-commons/issues/6. We should centralize the command to generate specs which, right now, is replicated in different components, i.e. here.

Depends on https://github.com/reanahub/reana-job-controller/issues/106, since the decision taken influences this initialisation. For instance, if we decide to use marshmallow we should be able to dynamically provide marshmallow models to the OpenAPI generator, i.e.:

def build_openapi_spec(publish, marshmallow_schemas):
    ...
    for name, schema in mashmallow_schemas:
        spec.definition(name, schema=schema)
diegodelemos commented 5 years ago

Add title, version as parameters in build_openapi_spec() in spec.py

Stemmed from https://github.com/reanahub/reana-job-controller/issues/86.

diegodelemos commented 5 years ago

Add openapi spec in get_openapi_spec() in app.py

Stemmed from https://github.com/reanahub/reana-job-controller/issues/85