@saflib/openapi
@saflib/openapi
Type Aliases
Type Alias | Description |
---|---|
ExtractRequestBody | Convenience type to lookup the request body by operationId. |
ExtractRequestPathParams | Convenience type to lookup the path params by operationId. |
ExtractRequestQueryParams | Convenience type to lookup the query params by operationId. |
ExtractResponseBody | Convenience type to lookup the response body by operationId. |
Variables
Variable | Description |
---|---|
errorSchema | The raw error.yaml file contents from this package. There's not a great way to share OpenAPI schemas between packages, so this is exported for use elsewhere. Mainly this is used by npm exec saf-specs generate which writes the contents to schemas/error.yaml of whatever package it's run in. |
Functions
Function | Description |
---|---|
castJson | Takes an imported JSON object and casts it to the OpenAPIV3.DocumentV3 type so that express-openapi-validator can validate the JSON against the OpenAPI spec without complaining about a type mismatch. |