Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for x-www-form-urlencoded #1

Open
m-horky opened this issue Sep 15, 2023 · 0 comments
Open

Support for x-www-form-urlencoded #1

m-horky opened this issue Sep 15, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@m-horky
Copy link
Owner

m-horky commented Sep 15, 2023

Input type application/x-www-form-urlencoded is not supported.

The following is an excerpt from Swagger's example API, which cannot be expressed via autocli-generated library:

{
"paths": {
    "/pet/{petId}": {
        "post": {
            "consumes": ["application/x-www-form-urlencoded"],
            "produces": ["application/json", "application/xml"],
            "parameters": [
                {
                    "name": "petId",
                    "in": "path",
                    "description": "ID of pet that needs to be updated",
                    "required": true,
                    "type": "integer",
                    "format": "int64"
                },
                {
                    "name": "name",
                    "in": "formData",
                    "description": "Updated name of the pet",
                    "required": false,
                    "type": "string"
                },
                {
                    "name": "status",
                    "in": "formData",
                    "description": "Updated status of the pet",
                    "required": false,
                    "type": "string"
                }
            ],
            "responses": {"405": {"description": "Invalid input"}},
            "security": [{"petstore_auth": ["write:pets", "read:pets"]}]
        }
    }
}

Preferable way of handling this would be adding a new flag -F.

@m-horky m-horky added the enhancement New feature or request label Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant