OpenAPI
Reference
The OpenAPI specifications are available on https://spec.openapis.org/oas/.
The following dialects are supported:
- OpenAPI 3.1 Schema Object Dialect
- OpenAPI 3.2 Schema Object Dialect
The following keywords are added: discriminator, example, externalDocs & xml.
These keywords do not perform any validation, they use the fallback for unknown keywords.
The following formats are added: int32, int64, float, double & password.
Example
local schema = require'schema'
require'schema.dialect.oas32'
local validator = schema.new({ type = 'integer', format = 'int64' })