Skip to content

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]: planned as primitive JSON-compatible object.
        • βœ… object: implemented as pydantic models
        • βœ… array: implemented as list
        • βœ… string, integer, number, boolean: implemented as str, int, float and bool
      • πŸ—“οΈ format: planned, including custom formats
      • βœ… assertion keywords: as supported by pydantic
      • ⚠️ allOf: needs improvement
      • βœ… anyOf: implemented as union
      • ⚠️ oneOf: treated as anyOf and implemented as Union
      • πŸ—“οΈ not: planned for objects
      • βœ… required: non-required properties are turned to Union[None, $type]
      • additionalProperties:
        • βœ… boolean: supported as pydantic extra: 'allow' or 'forbid'
        • πŸ—“οΈ schema: planned as a Mapping field
      • πŸ—“οΈ patternProperties: planned as Mapping field
      • πŸ” enum: ignored; might be implemented for simple types as Literal
      • πŸ“„ description: planned as part of docstr
      • βœ… default: if present, the property type turned to Union[None, $type] and has default value None
        • πŸ” caveat: default values are not to be sent between Web API client and server, instead they are implied be the receiving side. Lapidary could potentially fill such values in response models, but it might be expensive, so it would be an optional feature.
      • βœ… nullable: if true, the property type is turned to Union[None, $type]
      • βœ… readOnly & writeOnly: if either is true, the property type is turned to Union[None, $type] and has default value None; 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: ignored
      • πŸ” 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: not planned
  • paths
    • πŸ—“οΈ 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 value None
      • πŸ—“οΈ deprecated: planned
      • πŸ—“οΈ allowEmptyValue: planned
      • πŸ—“οΈ content: key: planned, value: processed as schema
      • ⚠️ style: partially implemented
      • πŸ—“οΈ allowReserved: planned
      • βœ… schema: implemented
      • πŸ” example & examples: considered
      • πŸ”§ x-lapidary-name: name of a parameter in the python
  • πŸ”§ x-lapidary-responses-global: responses that might come from any operation
  • πŸ”§ x-lapidary-headers-global: headers accepted by any operation