Skip to content

Use example value instead of default #296

@OzzyCzech

Description

@OzzyCzech

Is your feature request related to a problem?

There should be switch or something in config that allow us use example value instead of default or primitives in Example (from schema).

image

I've been looking at the code, there is TODO 😄

// TODO: determine if we should always ignore the example when creating from schema
// if (example !== undefined) {
// return example;
// }

Describe the solution you'd like

Would be nice use example when it's set or let developer chose what's they want.

Additional context

Let's check Swagger, they also use example values in example json Responses instead of string

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions