You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
User story.
As a API Designer, When I defined a field that doesn't match a regular expression, Then the value of the property can be prompted in the output.
Additional information
When I use the following OpenAPI specification
openapi: 3.0.0x-format-version: "1.0"info:
title: Dummy titledescription: Dummy descriptionversion: 1.0.0paths:
/some/path:
get:
description: Dummy descriptionparameters:
- in: headername: some_headerdescription: Some header description.schema:
type: string
- in: headername: someHeaderdescription: Some header description.schema:
type: string
- in: headername: some-headerdescription: Some header description.schema:
type: stringresponses:
"200":
description: All is good
And I use the following rule:
header-parameter-names-kebab-case:
type: styleseverity: errorrecommended: truedescription: A parameter in the header should be written in kebab-casemessage: "'{{property.value}}' is not kebab-cased: {{error}}"given: $..parameters[?(@.in === 'header')]then:
field: namefunction: patternfunctionOptions:
match: ^[a-z0-9]+((-[a-z0-9]+)+)?$
Then I would like to have as output something like this:
16:17 error [header-parameter-names-kebab-case] 'some_header' is not kebab-cased: must match the pattern '^[a-z0-9]+((-[a-z0-9]+)+)?$'
-> paths,/some/path,get,parameters,0,name
21:17 error [header-parameter-names-kebab-case] 'someHeader' is not kebab-cased: must match the pattern '^[a-z0-9]+((-[a-z0-9]+)+)?$'
-> paths,/some/path,get,parameters,1,name
At the end I would like to have another property (property.value in the sample) that can be used in the message in addition to the existing ones (property, error and description if I'm not wrong) and that can be use to give back the value of the field (easier for a functional to understand the output message).
If the issue is unclear, please do not hesitate to ask for more information. :)
The text was updated successfully, but these errors were encountered:
If the issue is unclear, please do not hesitate to ask for more information. :)
Everything is clear, no worries :)
I believe that having an access to value of property would be very beneficial for everyone, therefore I'm willing to implement this as a part of the next release. Stay tuned.
User story.
As a API Designer, When I defined a field that doesn't match a regular expression, Then the value of the property can be prompted in the output.
Additional information
When I use the following OpenAPI specification
And I use the following rule:
Then I would like to have as output something like this:
At the end I would like to have another property (property.value in the sample) that can be used in the message in addition to the existing ones (property, error and description if I'm not wrong) and that can be use to give back the value of the field (easier for a functional to understand the output message).
If the issue is unclear, please do not hesitate to ask for more information. :)
The text was updated successfully, but these errors were encountered: