Skip to content

Schema/Parameter default value #112

Closed
@jbee

Description

@jbee

I was surprised to find that the default value of a parameter needs to be expressed as default property on the parameter's schema. This confuses type default with endpoint parameter defaults. The type might not have a default but a parameter does.

Looking at schemas as on-off type descriptors there is no issue. However, usually implementations map the schema from a language type. E.g. mapping Java's Integer as integer. Such mappings would be held in a map source language type => Schema for reuse and identification of "the same type". If now the default, which is endpoint specific, is encoded as part of the schema this relation is broken and one would need to construct a key record with the source language type and the default value as components. This (hopefully) makes it clear that the default value in not a property of the schema but of the parameter and therefore it should be allowed to declared as field of the parameter directly.

Also when searching for the description of the default property of a Schema Object I could not find an actual declaration in any of the 3.x versions. But there are examples using it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions