Skip to content

Commit

Permalink
docs: clarify servers role in OAS 3.x and 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
mefellows committed Nov 6, 2024
1 parent a81ca8f commit 93961a2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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||
Expand Down

0 comments on commit 93961a2

Please sign in to comment.