Skip to content
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 support for extra format options in OpenAPI Sampler #185

Closed
derevnjuk opened this issue Feb 20, 2023 · 0 comments · Fixed by #186
Closed

Add support for extra format options in OpenAPI Sampler #185

derevnjuk opened this issue Feb 20, 2023 · 0 comments · Fixed by #186
Assignees
Labels
Type: enhancement New feature or request.

Comments

@derevnjuk
Copy link
Member

In accordance with the JSON Schema Validation vocabulary, data types may have an optional modifier property known as format. This spec defines a wide range of values, such as duration and time. To ensure compliance with the validation specification, it is necessary to include support for all of these values.

For example, if you have the following schema that needs to generate a sample of duration in ISO 8601:

sample({
  type: 'string',
  format: 'duration',
});
// P3D

or just time:

sample({
  type: 'string',
  format: 'time',
});
// '20:20:39+00:00'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: enhancement New feature or request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant