Skip to content

Standardize Parameter Models #301

Closed
Closed
@dilipkrish

Description

@dilipkrish

It seems odd that Serializable parameters be treated differently that Body Parameters. In the interest of consistency, I would think that regardless of the type of parameter it should always have a schema property.

"/api/pet/findByStatus": {
            "get": {
                ...
                "summary": "Finds Pets by status",
                "description": "Multiple status values can be provided with comma seperated strings",
                ...
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "description": "Status values that need to be considered for filter",
                        "required": true,
                        "type": "string", //<-- NOTE: Seems like this should be standardized
                        "default": "available"
                    }
                ],

I would expect it to be rendered as shown below

"/api/pet/findByStatus": {
            "get": {
                ...
                "summary": "Finds Pets by status",
                "description": "Multiple status values can be provided with comma seperated strings",
                ...
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "description": "Status values that need to be considered for filter",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }, 
                        "default": "available"
                    }
                ],

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