Closed xeptore closed 4 years ago
Thanks for the proposal @xeptore
Before merging it, considering that we should keep format
open for extensibility for custom defined formats and not to break those who already using it that way:
Thinking about this:
format?: 'int32' | 'int64' | 'float' | 'double' | 'byte' | 'binary' | 'date' | 'date-time' | 'password' | string;
What do you think?
Hi!
Pleasure to be one of the contributors.
Yes I agree with your suggested change. It seems format
property is losing its strength in being an assertion, as described here in latest JSON Schema Spec., and its becoming a convention than an assertion.
More precise type definitions to Schema interface's
format
andtype
properties.As defined in OpenAPI Specification - Data Types and possible range of values for JSON instance types here, I made mentioned Schema interface properties more precise which also increases developer experience with editor type hinting, as shown in the following two images: