-
Notifications
You must be signed in to change notification settings - Fork 31
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
Support for custom string formats #119
Labels
enhancement
New feature or request
Comments
Is this maybe fixed with #128? |
Yes, that fix and eclipse-vertx/vertx-openapi#51 allow you to specify a custom validator. Thanks for that. I was think that ideally we could override the default string format from here, for scenarios where we want to further restrict some of the validations, but that should be fine as long as we use custom formats anyway. Happy for this one to be closed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the feature
According to the OpenAPI specification, string "format" is an open value (https://swagger.io/docs/specification/data-models/data-types/#string)
That's also backed by the JSON Schema Specification Draft 2020-12](https://tools.ietf.org/html/draft-bhutton-json-schema-00#section-7.2.3)
The feature request is to support custom "format" fields, not only those defined in the above JSON Schema Specification and implemented on https://github.com/eclipse-vertx/vertx-json-schema/blob/4.4.6/src/main/java/io/vertx/json/schema/impl/Format.java
A regular expression pattern should not ideally be used for that as:
Use cases
As an organization API provider
I want to be able to create custom string formats
So I can communicate to the API users the expected format
And I can run the correct validation
Contribution
Are you volunteering for implementing this feature? 👍
The text was updated successfully, but these errors were encountered: