-
Notifications
You must be signed in to change notification settings - Fork 7
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-283086: POC validator with custom function #287
base: main
Are you sure you want to change the base?
Conversation
Error output with new changes:
|
tools/ipa/Makefile
Outdated
.PHONY: deps | ||
deps: ## Download go module dependencies | ||
@echo "==> Installing npx..." | ||
npm install -g npx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you gonan use npm can you move to a package json instead of a make file, also postman has a package json, let's please have a single package json and not multiple ones
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, was copying the existing spectral makefile for now. Do you mean having the same package json for postman + ipa tool?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean having the same package json for postman + ipa tool?
Yes a single source for dependencies in the repo, ie a mono repo approach
xgen-IPA-104-resource-has-GET: | ||
description: "APIs must provide a get method for resources. http://go/ipa/104" | ||
message: "{{error}} http://go/ipa/117" | ||
severity: error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning :P
@@ -0,0 +1,95 @@ | |||
const ERROR_MESSAGE = "APIs must provide a get method for resources." | |||
|
|||
export default (input, _, context) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we document what version of ES can we use?
function isChild(path) { | ||
return path.endsWith("}") | ||
} | ||
|
||
function isCustomMethod(path) { | ||
return path.includes(":") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can these be defined in a separate file and imported here, I may answer one of @drinkbird questions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely, I expect we'll have a bunch of common helper functions we can import for different custom functions
Proposed changes
Jira ticket: CLOUDP-#
Closes #[issue number]
Checklist
Changes to Spectral
Further comments