Skip to content

Support for constants is needed #18

@mutedchaos

Description

@mutedchaos

For typescript and json-schema it makes sense to have constant values, such as strings with specific values.

In the schemas this should be presented as something like field: { type: String, constValue: 'valuehere }; for TS interfaces the output should then be field: 'valuehere' and similarly the const should be presented as such in json-schema.

Const fields don't really make sense in mongoose though, maybe it'd be best to error out if such a field is to be included, the presence can be controlled with presentIn anyway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions