OpenAPI
Glue supports openapi as a code generation target, allowing you to generate OpenAPI specifications from Glue files. This can be useful for defining RESTful APIs and generating client libraries or server stubs in various programming languages.
Glue currently supports OpenAPI v3.0, and only JSON output.
Simply run:
shell
All integer primitive variants emit OpenAPI "type": "integer". i32/u32 use format: int32, and i64/u64 use format: int64.
#Example
For this Glue spec:
glue
...generating an OpenAPI spec...
shell
...will produce:
json
#Current limitations
- Proper typing of query/path parameters, authentication/authorization schemes are not yet supported
- Tuples are downcast to bounded arrays because OpenAPI 3.0 does not support positional tuple validation