Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLOUDP-260965: Check that the extention x-xgen-hidden has the correct format #119

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

andreaangiolillo
Copy link
Collaborator

Ticket

CLOUDP-260965

Description

Add spectral rule to check for the correct format of x-xgen-hidden-env

Testing

I tested locally by adding the x-xgen-hidden-env extension with the wrong format to multiple places (operation, response and response-body)

 spectral lint ./tools/cli/test/data/openapi-foas-dev.yaml --ruleset=.spectral.yaml --format stylish --display-only-failures

/Users/andrea.angiolillo/workspace/openapi/tools/cli/test/data/openapi-foas-dev.yaml
 33350:47  error  x-xgen-hidden-env-format  Ensure x-xgen-hidden-env extension has the correct format. https://go/openapi-hidden-extension  paths./api/atlas/v2/groups/{groupId}/clusters.get.responses[200].content.application/vnd.atlas.2025-01-01+json.x-xgen-hidden-env
 33514:43  error  x-xgen-hidden-env-format  Ensure x-xgen-hidden-env extension has the correct format. https://go/openapi-hidden-extension  paths./api/atlas/v2/groups/{groupId}/clusters.post.requestBody.content.application/vnd.atlas.2025-01-01+json.x-xgen-hidden-env
 33539:47  error  x-xgen-hidden-env-format  Ensure x-xgen-hidden-env extension has the correct format. https://go/openapi-hidden-extension  paths./api/atlas/v2/groups/{groupId}/clusters.post.responses[201].content.application/vnd.atlas.2025-01-01+json.x-xgen-hidden-env
 37609:31  error  x-xgen-hidden-env-format  Ensure x-xgen-hidden-env extension has the correct format. https://go/openapi-hidden-extension  paths./api/atlas/v2/groups/{groupId}/clusters/{clusterName}:pinFeatureCompatibilityVersion.post.x-xgen-hidden-env
 37659:31  error  x-xgen-hidden-env-format  Ensure x-xgen-hidden-env extension has the correct format. https://go/openapi-hidden-extension  paths./api/atlas/v2/groups/{groupId}/clusters/{clusterName}:unpinFeatureCompatibilityVersion.post.x-xgen-hidden-env
 45864:23  error  x-xgen-hidden-env-format  Ensure x-xgen-hidden-env extension has the correct format. https://go/openapi-hidden-extension  paths./api/atlas/v2/groups/{groupId}/uss/{name}/backup/restoreJobs.post.x-xgen-hidden-env.envs

✖ 6 problems (6 errors, 0 warnings, 0 infos, 0 hints)

@andreaangiolillo andreaangiolillo marked this pull request as ready for review July 30, 2024 08:05
@andreaangiolillo andreaangiolillo requested a review from a team as a code owner July 30, 2024 08:05
@andreaangiolillo andreaangiolillo merged commit 2e5bceb into main Jul 30, 2024
6 checks passed
@andreaangiolillo andreaangiolillo deleted the CLOUDP-260965 branch July 30, 2024 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants