Skip to content

Enumeration of data model properties #21

Closed
@gbisaga

Description

@gbisaga

I have a case where I have an enumeration that can return different String values. The @ApiModelProperty's allowableValues is close, but I need to have metadata associated with each possible value. Something like this:

@ApiModelProperty(...., allowableValues={
@ApiModelPropertyValue( value="registered", description="Yada yada...", discriminator="PUT" ),
@ApiModelPropertyValue( value="active", description="Yada yada...", discriminator="PUT,POST" ),
@ApiModelPropertyValue( value="closed", description="Yada yada...", discriminator="POST" )
});

It seems like any time there is a value, you'd need to at least describe the possible values.

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