Skip to content

Commit d44003c

Browse files
πŸ“ Update OpenAPI compatibility doc.
1 parent 6ec9fda commit d44003c

File tree

1 file changed

+74
-73
lines changed

1 file changed

+74
-73
lines changed

β€Ždocs/openapi.mdβ€Ž

Lines changed: 74 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,76 @@
11
# OpenAPI compatibility
22

3-
- openapi: validated (3.0.* accepted)
4-
- info
5-
- license: Not usable. It's up to the user to verify the accepted use.
6-
- title and other fields: planned as part of project readme
7-
- externalDocs: planned as part of the project readme
8-
- servers: first server is used
9-
- url: used as the base URL
10-
- variables: default values are used to evaluate the server URL
11-
- security: implemented
12-
- tags: ignored, not planned
13-
- components
14-
- schemas:
15-
- title: planned as part of class docstr
16-
- type
17-
- [no value]: planned as primitive JSON-compatible object.
18-
- object: implemented as pydantic models
19-
- array: implemented as list
20-
- string, integer, number, boolean: implemented as str, int, float and bool
21-
- format: planned, including custom formats
22-
- validation keyword: supported by pydantic
23-
- allOf: needs improvement
24-
- oneOf and anyOf: implemented as union
25-
- not: planned for objects
26-
- required: non-required properties are turned to `Union[None, $type]`
27-
- additionalProperties:
28-
- boolean: supported as pydantic `extra: 'allow'` or `'forbid'`
29-
- schema: planned as a `Mapping` field
30-
- patternProperties: planned as `Mapping` field
31-
- enum: ignored; might be implemented for simple types as `Literal`
32-
- description: planned as part of docstr
33-
- default: if present, the property type turned to `Union[None, $type]` and has default value `None`
34-
- 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's not planned.
35-
- nullable: if true, the property type is turned to `Union[None, $type]`
36-
- 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
37-
- 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.
38-
- discriminator: ignored
39-
- example: might be used as part of docstr
40-
- externalDocs: planned as part of docstr
41-
- deprecated: planned
42-
- xml: ignored, currently not planned
43-
- responses
44-
- description: planned as part of docstr
45-
- headers: if present, used as fields in the response envelope class
46-
- content: implemented; used as operation method return type, and a way to resolve model type for a response
47-
- links: ignored; might be used to generate methods in the response envelope
48-
- parameters: used in-line in operations
49-
- examples: ignored
50-
- requestBodies
51-
- description: planned as part of docstr
52-
- content: implemented
53-
- required: planned
54-
- headers: implemented
55-
- securitySchemes: implemented with httpx_auth
56-
- refreshUrl: not supported
57-
- links: planned
58-
- callbacks: not planned
59-
- paths
60-
- summary, description: planned as parts of docstr
61-
- servers: ignored
62-
- parameters
63-
- 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
64-
- in: implemented, suffix-hungarian notation is used to separate parameters
65-
- required: non-required parameters are optional with default value `None`
66-
- deprecated: planned
67-
- allowEmtyValue: planned
68-
- content: key: planned, value: processed as schema
69-
- style: partially implemented
70-
- allowReserved: planned
71-
- schema: implemented
72-
- example & examples: planned
73-
- x-lapidary-name: name of a parameter in the python
74-
- x-lapidary-responses-global: responses that might come from any operation
75-
- x-lapidary-headers-global: headers accepted by any operation
3+
- βœ… `openapi`: validated (3.0.* accepted)
4+
- `info`
5+
- ❌ `license`: N/A; it's up to the user to verify the accepted use.
6+
- πŸ—“οΈ `title` and other fields: planned as part of project readme
7+
- πŸ—“οΈ `externalDocs`: planned as part of the project readme
8+
- βœ… `servers`: first server is used
9+
- βœ… `url`: used as the base URL
10+
- βœ… `variables`: default values are used to evaluate the server URL
11+
- βœ… `security`: implemented
12+
- ❌ `tags`: ignored
13+
- `components`
14+
- βœ… `schemas`:
15+
- πŸ—“οΈ `title`: planned as part of class docstr
16+
- `type`
17+
- πŸ—“οΈ [no value]: planned as primitive JSON-compatible object.
18+
- βœ… `object`: implemented as pydantic models
19+
- βœ… `array`: implemented as list
20+
- βœ… `string`, `integer`, `number`, `boolean`: implemented as `str`, `int`, `float` and `bool`
21+
- πŸ—“οΈ `format`: planned, including custom formats
22+
- βœ… assertion keywords: as supported by pydantic
23+
- ⚠️ `allOf`: needs improvement
24+
- βœ… `anyOf`: implemented as union
25+
- ⚠️ `oneOf`: treated as `anyOf` and implemented as `Union`
26+
- πŸ—“οΈ `not`: planned for objects
27+
- βœ… `required`: non-required properties are turned to `Union[None, $type]`
28+
- `additionalProperties`:
29+
- βœ… boolean: supported as pydantic `extra: 'allow'` or `'forbid'`
30+
- πŸ—“οΈ schema: planned as a `Mapping` field
31+
- πŸ—“οΈ `patternProperties`: planned as `Mapping` field
32+
- πŸ” `enum`: ignored; might be implemented for simple types as `Literal`
33+
- πŸ“„ `description`: planned as part of docstr
34+
- βœ… `default`: if present, the property type turned to `Union[None, $type]` and has default value `None`
35+
- πŸ” 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.
36+
- βœ… `nullable`: if true, the property type is turned to `Union[None, $type]`
37+
- βœ… `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
38+
- ⚠️ 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.
39+
- ❌ `discriminator`: ignored
40+
- πŸ” `example`: might be used as part of docstr
41+
- πŸ—“οΈ `externalDocs`: planned as part of docstr
42+
- πŸ—“οΈ `deprecated`: planned
43+
- ❌ `xml`: ignored, currently not planned
44+
- `responses`
45+
- πŸ—“οΈ `description`: planned as part of docstr
46+
- βœ… `headers`: if present, used as fields in the response envelope class
47+
- βœ… `content`: implemented; used as operation method return type, and a way to resolve model type for a response
48+
- πŸ” `links`: ignored; might be used to generate methods in the response envelope
49+
- βœ… `parameters`: used in-line in operations
50+
- πŸ” `examples`: currently ignored
51+
- `requestBodies`
52+
- πŸ—“οΈ `description`: planned as part of docstr
53+
- βœ… `content`: implemented
54+
- πŸ—“οΈ `required`: planned
55+
- βœ… `headers`: implemented
56+
- ⚠️ `securitySchemes`: implemented with httpx_auth
57+
- ❌ `refreshUrl`: not supported
58+
- πŸ—“οΈ `links`: planned
59+
- ❌ `callbacks`: not planned
60+
- `paths`
61+
- πŸ—“οΈ `summary`, `description`: planned as parts of docstr
62+
- ❌ `servers`: ignored
63+
- `parameters`
64+
- βœ… `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
65+
- βœ… `in`: implemented, suffix-hungarian notation is used to separate parameters
66+
- βœ… `required`: non-required parameters are optional with default value `None`
67+
- πŸ—“οΈ `deprecated`: planned
68+
- πŸ—“οΈ `allowEmptyValue`: planned
69+
- πŸ—“οΈ `content`: key: planned, value: processed as schema
70+
- ⚠️ `style`: partially implemented
71+
- πŸ—“οΈ `allowReserved`: planned
72+
- βœ… `schema`: implemented
73+
- πŸ” `example` & examples: considered
74+
- πŸ”§ `x-lapidary-name`: name of a parameter in the python
75+
- πŸ”§ `x-lapidary-responses-global`: responses that might come from any operation
76+
- πŸ”§ `x-lapidary-headers-global`: headers accepted by any operation

0 commit comments

Comments
Β (0)