|
| 1 | +> [!WARNING] |
| 2 | +> OpenAPI support for JSON:API is currently experimental. The API and the structure of the OpenAPI document may change in future versions. |
| 3 | +
|
1 | 4 | # OpenAPI clients
|
2 | 5 |
|
3 | 6 | After [enabling OpenAPI](~/usage/openapi.md), you can generate a typed JSON:API client for your API in various programming languages.
|
@@ -317,3 +320,37 @@ demonstrates how to use them. It uses local IDs to:
|
317 | 320 | - Assign the todo-item to the created person
|
318 | 321 |
|
319 | 322 | ---
|
| 323 | + |
| 324 | +## Known limitations |
| 325 | + |
| 326 | +# [NSwag](#tab/nswag) |
| 327 | + |
| 328 | +| Limitation | Workaround | Links | |
| 329 | +| --- | --- | --- | |
| 330 | +| Partial POST/PATCH sends incorrect request | Use `TrackChangesFor` from `JsonApiDotNetCore.OpenApi.Client.NSwag` package | | |
| 331 | +| Exception thrown on successful HTTP status | Use `TranslateAsync` from `JsonApiDotNetCore.OpenApi.Client.NSwag` package | https://github.com/RicoSuter/NSwag/issues/2499 | |
| 332 | +| No `Accept` header sent when only error responses define `Content-Type` | `JsonApiDotNetCore.OpenApi.Swashbuckle` package contains workaround | | |
| 333 | +| Schema type not always inferred with `allOf` | `JsonApiDotNetCore.OpenApi.Swashbuckle` package contains workaround | | |
| 334 | +| Generated code for JSON:API extensions does not compile | `JsonApiDotNetCore.OpenApi.Swashbuckle` package contains workaround | | |
| 335 | +| A project can't contain both JSON:API clients and regular OpenAPI clients | Use separate projects | | |
| 336 | + |
| 337 | +# [Kiota](#tab/kiota) |
| 338 | + |
| 339 | +| Limitation | Workaround | Links | |
| 340 | +| --- | --- | --- | |
| 341 | +| Properties are always nullable | - | https://github.com/microsoft/kiota/issues/3911 | |
| 342 | +| JSON:API query strings are inaccessible | Use `SetQueryStringHttpMessageHandler.CreateScope` from `JsonApiDotNetCore.OpenApi.Client.Kiota` package | https://github.com/microsoft/kiota/issues/3800 | |
| 343 | +| Properties set to `null` are sent twice | - | https://github.com/microsoft/kiota-dotnet/issues/535 | |
| 344 | +| HTTP 304 (Not Modified) is not properly recognized | Catch `ApiException` and inspect the response status code | https://github.com/microsoft/kiota/issues/4190, https://github.com/microsoft/kiota-dotnet/issues/531 | |
| 345 | +| Generator warns about unsupported formats | Use `JsonApiDotNetCore.OpenApi.Client.Kiota` package | https://github.com/microsoft/kiota/issues/4227 | |
| 346 | +| `Stream` response for HEAD request | - | https://github.com/microsoft/kiota/issues/4245 | |
| 347 | +| Unhelpful exception messages | - | https://github.com/microsoft/kiota/issues/4349 | |
| 348 | +| Discriminator properties aren't being set automatically | - | https://github.com/microsoft/kiota/issues/4618 | |
| 349 | +| Discriminator mappings must be repeated in every derived type used in responses | `JsonApiDotNetCore.OpenApi.Swashbuckle` package contains workaround | https://github.com/microsoft/kiota/issues/2432 | |
| 350 | +| `x-abstract` in `openapi.json` is ignored | - | | |
| 351 | +| No MSBuild / IDE support | Use `KiotaReference` from `JsonApiDotNetCore.OpenApi.Client.Kiota` package | https://github.com/microsoft/kiota/issues/3005 | |
| 352 | +| Incorrect nullability in API methods | Use `KiotaReference` from `JsonApiDotNetCore.OpenApi.Client.Kiota` package | https://github.com/microsoft/kiota/issues/3944 | |
| 353 | +| Generated code for JSON:API extensions does not compile | `JsonApiDotNetCore.OpenApi.Swashbuckle` package contains workaround | | |
| 354 | +| Properties are always sent in alphabetic order | - | https://github.com/microsoft/kiota/issues/4680 | |
| 355 | + |
| 356 | +--- |
0 commit comments