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
I am specifying something like this in openapi yml file. - name: "City" in: "query" schema: type: string pattern: '(\s*\S\s*)+' description: "City component of the address" required: true
When the value of city parameter does not matches regex, right now, it shows a message by itself.
I have usecase wherein, I want to provide a message by myself.
I want something like this in future - name: "City" in: "query" schema: type: string pattern: '(\s*\S\s*)+' message: "City field requires atleast one non-whitespace character" description: "City component of the address" required: true
Is it possible to achieve something like this?
The text was updated successfully, but these errors were encountered:
When you say "it shows a message by itself", are you thinking about a specific tool?
We delegate the schemaObject definition to the JSON Schema spec, so keywords to extend/override validation messages are probably best discussed there. I found the following related issue: json-schema-org/json-schema-spec#1075
I am specifying something like this in openapi yml file.
- name: "City" in: "query" schema: type: string pattern: '(\s*\S\s*)+' description: "City component of the address" required: true
When the value of city parameter does not matches regex, right now, it shows a message by itself.
I have usecase wherein, I want to provide a message by myself.
I want something like this in future
- name: "City" in: "query" schema: type: string pattern: '(\s*\S\s*)+' message: "City field requires atleast one non-whitespace character" description: "City component of the address" required: true
Is it possible to achieve something like this?
The text was updated successfully, but these errors were encountered: