Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ Discovery semantics:
| `--description` | - | any string | library default | OpenAPI `info.description` (Markdown / CommonMark supported) |
| `--output` | `-o` | file path | stdout | Write generated content to file |
| `--format` | `-f` | `json`, `yaml` | `json` | Output serialization format |
| `--openapi-version` | - | `3.0`, `3.1`, `3.2` | `3.1` | OpenAPI schema version |
| `--openapi-version` | - | `3.0`, `3.1`, `3.2` | `3.1` | OpenAPI schema version. See [version selection guidance](faq.md#openapi-30-vs-31-vs-32-which-one-should-i-use). |
| `--pretty` | `-p` | flag | `false` | Pretty-print JSON output (adds indentation); no effect on YAML |
| `--route-prefix` | - | any string (or `""`) | `/api` | HTTP route prefix from `host.json` `extensions.http.routePrefix`. See [Route Prefix](route-prefix.md). |
| `--fail-on-empty-paths` | - | flag | `false` | Exit with code 1 if the generated spec has no paths |
Expand Down
3 changes: 3 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ Supported versions:
- `OPENAPI_VERSION_3_1` (`"3.1.0"`)
- `OPENAPI_VERSION_3_2` (`"3.2.0"`)

For guidance on choosing a version for downstream consumers such as Azure API
Management, see the [OpenAPI version FAQ](faq.md#openapi-30-vs-31-vs-32-which-one-should-i-use).

```python
from azure_functions_openapi import OPENAPI_VERSION_3_1, get_openapi_json

Expand Down
6 changes: 5 additions & 1 deletion docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

## OpenAPI 3.0 vs 3.1 vs 3.2: which one should I use?

Use 3.0.0 if downstream tooling in your stack still expects OpenAPI 3.0.
Use 3.0.0 if downstream tooling in your stack still expects OpenAPI 3.0. For
example, Azure API Management supports OpenAPI 2.0 and 3.0.x, while it
treats OpenAPI 3.1 as import only (3.1-specific constructs are ignored or
downgraded) and recommends 2.0 or 3.0.x for full fidelity. See
[API formats support in Azure API Management](https://learn.microsoft.com/en-us/azure/api-management/api-management-api-import-restrictions).

Use 3.1.0 if your tooling supports it and you want newer JSON Schema alignment.

Expand Down
Loading