openapi function

Builds OpenAPI objects