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

add target to validate swagger with spectral #164

Merged
merged 3 commits into from
Mar 30, 2022

Conversation

tupyy
Copy link
Collaborator

@tupyy tupyy commented Mar 30, 2022

This PR address the issue #155.

The rules set is the default one for OpenAPI.

Makefile Outdated
@@ -197,6 +197,9 @@ ifeq (, $(shell which ginkgo))
$(call go-get-tool,$(GINKGO),github.com/onsi/ginkgo/ginkgo@v1.16.5)
endif

validate-swagger: ## Validate swagger
$(DOCKER) run -it --rm -v $(PWD)/.spectral.yaml:/tmp/.spectral.yaml -v $(PWD)/swagger.yaml:/tmp/swagger.yaml stoplight/spectral lint --ruleset "/tmp/.spectral.yaml" /tmp/swagger.yaml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls remove trailing whitespace

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could the use of mktemp be more appropriate and consistent with the rest of the Makefile?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't think it is needed here. the file should exist only inside a container that will be removed after the execution ends.

@masayag
Copy link
Collaborator

masayag commented Mar 30, 2022

@tupyy Welcome and Thank you! :-)

Copy link
Collaborator

@gciavarrini gciavarrini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tupyy Welcome :)

@tupyy
Copy link
Collaborator Author

tupyy commented Mar 30, 2022

@masayag @gciavarrini Thank you! :)

@masayag masayag merged commit 6717f47 into project-flotta:main Mar 30, 2022
@tupyy tupyy deleted the add-validator-swagger branch March 30, 2022 11:18
@tupyy tupyy restored the add-validator-swagger branch April 15, 2022 12:18
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.

None yet

3 participants