OpenAPI
OpenAPI compatibility
- β
openapi
: validated (3.0.* accepted) info
- β
license
: N/A; it's up to the user to verify the accepted use. - ποΈ
title
and other fields: planned as part of project readme
- β
- ποΈ
externalDocs
: planned as part of the project readme - β
servers
: first server is used- β
url
: used as the base URL - β
variables
: default values are used to evaluate the server URL
- β
- β
security
: implemented - β
tags
: ignored components
- β
schemas
:- ποΈ
title
: planned as part of class docstr type
- β
[no value]: implemented as
pydantic.JsonValue
- β οΈ caveat: it which includes
None
- β
object
: implemented as pydantic model - β
array
: implemented as list - β
string
,integer
,number
,boolean
: implemented asstr
,int
,float
andbool
- β
[no value]: implemented as
- β οΈ
format
: Implemented for string types:uuid
,date
,date-time
,time
anddecimal
- β assertion keywords: as supported by annotated-types
- β
allOf
: implemented - β
anyOf
: implemented as union - β οΈ
oneOf
: treated asanyOf
and implemented asUnion
- ποΈ
not
: planned - β
required
: non-required properties are turned toUnion[None, $type]
additionalProperties
:- β
boolean: supported as pydantic
extra: 'allow'
or'forbid'
- ποΈ schema: planned as either a
Mapping
type or a__pydantic_extra__
field - π
enum
: ignored; might be implemented for simple types asLiteral
- π
description
: planned as part of docstr - β
default
: if present, the property type turned toUnion[None, $type]
and has default valueNone
- π caveat: default values are not to be sent between Web API client and server, instead they are implied by the receiving side. Lapidary could potentially implement generating default values for some cases but they don't necessary need to validate against the schema.
- β
nullable
: if true, the property type is turned toUnion[None, $type]
- β
readOnly
&writeOnly
: if either is true, the property type is turned toUnion[None, $type]
and has default valueNone
; planned as part of docstr- β οΈ caveat: readOnly properties are only to be sent to API server, and writeOnly only to be received by the client. A property might be both required one way, and invalid the other way, which could not be directly represented in Python, except with two or three classes for every schema.
- π
discriminator
: planed for use with pydantic discriminated unions - π
example
: might be used as part of docstr - ποΈ
externalDocs
: planned as part of docstr - ποΈ
deprecated
: planned - β
xml
: ignored, currently not planned
- ποΈ
responses
- ποΈ
description
: planned as part of docstr - β
headers
: if present, used as fields in the response envelope class - β
content
: implemented; used as operation method return type, and a way to resolve model type for a response - π
links
: ignored; might be used to generate methods in the response envelope
- ποΈ
- β
parameters
: used in-line in operations - π
examples
: currently ignored requestBodies
- ποΈ
description
: planned as part of docstr - β
content
: implemented - ποΈ
required
: planned
- ποΈ
- β
headers
: implemented - β οΈ
securitySchemes
: implemented with httpx_auth- β
refreshUrl
: not supported
- β
- ποΈ
links
: planned - ποΈ
callbacks
: only planning to generate models from referenced schemas
- β
paths
: ποΈ planned as keys in a TypedDict- operations: β
mapped to operation methods
operationId
: β used as method name- ποΈ
summary
,description
: planned as parts of docstr - β
servers
: ignored parameters
- β
name
: OpenAPI parameter names are not unique and might contain characters invalid for python names, therefore they're escaped and suffix-hungarian notation is used to distinguish between cookie, header, path and query parameters - β
in
: implemented, suffix-hungarian notation is used to separate parameters - β
required
: non-required parameters are optional with default valueNone
- ποΈ
deprecated
: planned - ποΈ
allowEmptyValue
: planned - ποΈ
content
: key: planned, value: processed as schema - β οΈ
style
: partially implemented - ποΈ
allowReserved
: planned - β
schema
: implemented - π
example
&examples
: considered
- β
- operations: β
mapped to operation methods