From 93961a2584dc5fd1fda4f3a91eb47ec0ee2c64ed Mon Sep 17 00:00:00 2001 From: Matt Fellows <53900+mefellows@users.noreply.github.com> Date: Wed, 6 Nov 2024 17:44:38 +1100 Subject: [PATCH] docs: clarify servers role in OAS 3.x and 2.x --- .../bi-directional-contract-testing/contracts/oas/features.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/bi-directional-contract-testing/contracts/oas/features.md b/website/docs/docs/bi-directional-contract-testing/contracts/oas/features.md index 30cdcba8..1231878d 100644 --- a/website/docs/docs/bi-directional-contract-testing/contracts/oas/features.md +++ b/website/docs/docs/bi-directional-contract-testing/contracts/oas/features.md @@ -48,7 +48,7 @@ Full JSON Schema 2020-12 support, including resolving [references ($ref)](https: |Feature|Supported|Description|Example| |--- |--- |--- |--- | -|[Server Object](https://spec.openapis.org/oas/v3.1.0#server-object)|N|The `servers` are not used in request matching. See [Issue #28](https://github.com/pactflow/swagger-mock-validator/issues/28) for background. Comparison of Pact interactions to OAS endpoints does not consider any `basePath` in its comparison. In [OAS 3 (and also 2)](https://swagger.io/docs/specification/api-host-and-base-path/), all API endpoints are considered to be relative to the base URL. For example, assuming the base URL of `https://api.example.com/v1`, the `/users` endpoint refers to `https://api.example.com/v1/users`. Our comparison does not consider the impact of `basePath` as there may be multiple servers with different context paths and there is no clear way to resolve this ambiguity. In this example, a pact interaction with path `/v1/users/` will not match an OAS that only has `/users/` in its resource path. |[Example](https://github.com/pactflow/bdct-oas-examples/tree/main/examples/servers)| +|[Server Object](https://spec.openapis.org/oas/v3.1.0#server-object)|N|The `servers` are not used in request matching for 3.x.x OpenAPI descriptions, they are supported in OpenAPI 2.x. See [Issue #28](https://github.com/pactflow/swagger-mock-validator/issues/28) for background. Comparison of Pact interactions to OAS endpoints does not consider any `basePath` in its comparison. In [OAS 3 (and also 2)](https://swagger.io/docs/specification/api-host-and-base-path/), all API endpoints are considered to be relative to the base URL. For example, assuming the base URL of `https://api.example.com/v1`, the `/users` endpoint refers to `https://api.example.com/v1/users`. Our comparison does not consider the impact of `basePath` as there may be multiple servers with different context paths and there is no clear way to resolve this ambiguity. In this example, a pact interaction with path `/v1/users/` will not match an OAS that only has `/users/` in its resource path. |[Example](https://github.com/pactflow/bdct-oas-examples/tree/main/examples/servers)| |[Security Filtering](https://spec.openapis.org/oas/v3.1.0#security-filtering)|N|Ignored|| |[Info](https://spec.openapis.org/oas/v3.1.0#security-filtering)|N|Ignored|| |[Contact](https://spec.openapis.org/oas/v3.1.0#contact-object)|N|Ignored||