oneOf rule should apply to OpenAPI 2.0 only #9

Closed
opened 2023-01-09 23:05:10 +00:00 by arthurcogo · 2 comments
arthurcogo commented 2023-01-09 23:05:10 +00:00 (Migrated from github.com)

The ruleset currently has the following rule:

image

However, the AWS documentation states:

oneOf is not supported for OpenAPI 2.0 or SDK generation.

I have been able to use oneOf successfully in API Gateway with 3.0 which seems to confirm this.

Therefore, I suggest that this rule only applies to OpenAPI 2.0 specs.

The ruleset currently has the following rule: ![image](https://user-images.githubusercontent.com/99221595/211425684-b461cbf4-53f6-4318-b7fa-f7ee318298f0.png) However, the [AWS documentation](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-known-issues.html) states: > `oneOf` is not supported for OpenAPI 2.0 or SDK generation. I have been able to use oneOf successfully in API Gateway with 3.0 which seems to confirm this. Therefore, I suggest that this rule only applies to OpenAPI 2.0 specs.
andylockran commented 2023-03-07 20:11:05 +00:00 (Migrated from github.com)

Thanks for the feedback, unfortunately due to time constraints I'd not worked out how to differentiate between the two AWS OpenAPI implementations, so am assuming that this library should only work with the v3 fork of OpenAPI.

As the AWS documentation has been updated, I will fix this by removing the warning around oneOf not being supported, and make it clearer in the README that this is only targetting openapiV3-aws.

Thanks for the feedback, unfortunately due to time constraints I'd not worked out how to differentiate between the two AWS OpenAPI implementations, so am assuming that this library should only work with the v3 fork of OpenAPI. As the AWS documentation has been updated, I will fix this by removing the warning around oneOf not being supported, and make it clearer in the README that this is only targetting openapiV3-aws.
andylockran commented 2023-03-07 21:22:31 +00:00 (Migrated from github.com)

Thank you so much - this has now been released.

Thank you so much - this has now been released.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
andylockran/spectral-aws-apigateway-ruleset#9
No description provided.