-
Notifications
You must be signed in to change notification settings - Fork 46
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 ability for ARM report #422
base: main
Are you sure you want to change the base?
Conversation
@@ -174,3 +176,16 @@ export function isSchemaEqual(a: any, b: any): boolean { | |||
} | |||
return false; | |||
} | |||
|
|||
export function createRuleFunctionWithPasses<I = unknown, O = unknown>(fn:(input:I, options:O, ctx: RulesetFunctionContext)=> IFunctionResult[]) { |
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.
const messsages = fn(input,options,ctx) | ||
if (messsages.length === 0) { | ||
messsages.push({ | ||
message: `[Verbose]this is a verbose message to indicate that this rule was passed for specific swagger schema successfully and no fix is needed, please ignore it.`, |
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.
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.
The path is another field of the error object, I think we don't need to duplicate it in the message
Fixed #421
after the PR, the message will contain 'details.providerNamespace' and 'details.resourceType' fields when the jsonpath contains a swagger path
And the verbose message would like