The Open API specification for the Open Science Framework API lives here. The developer documentation is generated from this specification by ReDoc.
- The openapi specification for the OSF API lives in
swagger-spec/swagger.yamland contains references to many YAML files in theswagger-specdirectory.
- As a general rule, the
swagger.yamlfile should be kept as minimal as possible, meaning$refsto other YAML files should be utilized over inline endpoint and model definitions. - Each collection of related endpoints is contained in it's own folder in the
swagger-specdirectory (i.e.,swagger-spec/preprints/), with each unique API endpoint having it's own YAML file (i.e.,detail.yamlandlist.yamlfor/preprints/and/preprints/{preprint_id}/, respectively). - The specification should always conform to the official OpenAPI specification (v2.0), described in detail here.
yarn installyarn run build(spec validation)yarn run serve(serves at localhost:8080)- OR
yarn run watch(serves at localhost:8080 with livereload)
- OR
yarn run bundle
yarn run serve