|
1 | | -# OpenAPI 3.2.0 Compliance |
2 | | - |
3 | | -This project is actively pursuing 100% compliance with the **OpenAPI 3.2.0 Specification**. |
4 | | - |
5 | | -## Supported Features |
6 | | - |
7 | | -The following OpenAPI 3.2.0 structures are fully modeled in `src/openapi_client/models.py` via Pydantic and actively supported in the AST parsing/emitting pipeline: |
8 | | - |
9 | | -### Document Structure |
10 | | -- **OpenAPI Object**: Core root object supporting `openapi: 3.2.0`, `info`, `paths`, `components`, `servers`, `security`, `tags`, `webhooks`, and `$self`. |
11 | | -- **Info Object**: Fully supported, including `Contact` and `License` objects. |
12 | | -- **Server / ServerVariable Objects**: Fully modeled. |
13 | | -- **Paths / PathItem Objects**: Supports standard HTTP methods (`get`, `post`, `put`, `delete`, `patch`, `options`, `head`, `trace`) as well as the new OAS 3.2.0 `query` method and `additionalOperations` mapping. |
14 | | -- **Operation Object**: Supports `operationId`, `summary`, `description`, `parameters`, `requestBody`, `responses`, `callbacks`, `security`, etc. |
15 | | -- **Components Object**: Models schemas, responses, parameters, examples, requestBodies, headers, securitySchemes, links, callbacks, pathItems, and `mediaTypes` (new in OAS 3.2.0). |
16 | | - |
17 | | -### Schema & Data Types |
18 | | -- **Schema Object**: Includes full JSON Schema validation properties (`type`, `properties`, `items`, `allOf`, `anyOf`, `oneOf`, `discriminator`, etc.). |
19 | | -- **Reference Object**: Full support for `$ref` pointer objects across paths, components, parameters, etc. |
20 | | - |
21 | | -### Media Types & Encodings (OAS 3.2.0 Enhancements) |
22 | | -- **MediaType Object**: Supports the newly defined streaming and sequential payload fields `itemSchema`, `prefixEncoding`, and `itemEncoding`. |
23 | | -- **Encoding Object**: Supports headers, standard encodings, `prefixEncoding`, and `itemEncoding`. |
24 | | - |
25 | | -## Partial / Ongoing Support |
26 | | -All previous ongoing issues have been implemented: |
27 | | - |
28 | | -1. **Complex Parameters**: Deep object serializations for Query strings (`spaceDelimited`, `pipeDelimited`) are fully generated in the Python client, automatically building delimited query strings and strongly typed input arguments. |
29 | | -2. **Streaming / Webhooks**: FastAPI mock extraction properly extracts event-driven / server-sent events (`text/event-stream`) for `EventSourceResponse`, and test extraction parses tests checking for SSE streams. |
30 | | -3. **Implicit Connections**: Cross-document `$ref` resolution is fully supported across local JSON file scopes. |
31 | | - |
32 | | -## Testing Compliance |
33 | | -Compliance is strictly enforced via 100% test coverage and `mypy` strict mode checking across all model definitions and serializers. |
| 1 | +# OpenAPI 3.2.0 Compliance Report |
| 2 | + |
| 3 | +This document outlines the current level of compliance of `cdd-python-client` with the [OpenAPI 3.2.0 Specification](https://raw.githubusercontent.com/OAI/OpenAPI-Specification/refs/heads/main/versions/3.2.0.md). |
| 4 | + |
| 5 | +## Currently Implemented |
| 6 | + |
| 7 | +- **OpenAPI Object**: `openapi` version parsing (`3.2.0`), `info`, `paths`, `components` (schemas). |
| 8 | +- **Info Object**: `title`, `version`. |
| 9 | +- **Paths Object**: basic mapping of routes. |
| 10 | +- **Path Item Object**: `get`, `post`, `put`, `delete`, `patch`. |
| 11 | +- **Operation Object**: `operationId`, `parameters`, `requestBody`, `responses`, `deprecated`, `tags`. |
| 12 | +- **Parameter Object**: `name`, `in` (query/path/header/cookie). |
| 13 | +- **RequestBody Object**: `content`, `required`. |
| 14 | +- **Response Object**: `description`, `content`. |
| 15 | +- **Schema Object**: basic types (`string`, `integer`, `boolean`, `array`, `object`, `number`), `properties`, `$ref`. |
| 16 | +- **MediaType Object**: `schema` mapping. |
| 17 | + |
| 18 | +## Missing / Partial Implementation (WIP) |
| 19 | + |
| 20 | +- **OpenAPI Object**: `servers`, `security`, `externalDocs`, `webhooks`. |
| 21 | +- **Info Object**: `description`, `termsOfService`, `contact`, `license`, `summary`. |
| 22 | +- **Server Object** & **Server Variable Object**. |
| 23 | +- **Operation Object**: `callbacks`, `security`, `servers`. |
| 24 | +- **Responses Object**: advanced status mapping. |
| 25 | +- **Header Object**. |
| 26 | +- **Security Scheme Object** & **Security Requirement Object**. |
| 27 | +- **Components Object**: `responses`, `parameters`, `examples`, `requestBodies`, `headers`, `securitySchemes`, `links`, `callbacks`, `pathItems`. |
| 28 | +- **Discriminator Object** & polymorphism (`allOf`, `anyOf`, `oneOf`). |
| 29 | +- **XML Object**. |
| 30 | + |
| 31 | +## Goal |
| 32 | + |
| 33 | +Achieve 100% compliance with OpenAPI 3.2.0 by progressively adding AST mapping for missing components and expanding the Intermediate Representation (IR) to natively support all 3.2.0 features. |
0 commit comments