Skip to content

feat: 🎸 for v2 parameter in: formData and type: file supported#1

Open
charlzyx wants to merge 1 commit intokurtbuilds:masterfrom
charlzyx:master
Open

feat: 🎸 for v2 parameter in: formData and type: file supported#1
charlzyx wants to merge 1 commit intokurtbuilds:masterfrom
charlzyx:master

Conversation

@charlzyx
Copy link

1. Swagger V2 Parameter Item Object's in: 'formData' process

2. Swagger V2 Schema Object `type: 'file' supported.

3. Both of up changes can upgrade to OpenAPI V3

sorry but spaces much by auto reformated, maybe rustfmt.toml should gived.

{
  "parameters": [
    {
      "name": "pet",
      "in": "formData",
      "description": "Pet to add to the store",
      "required": true,
      "schema": {
        "$ref": "#/definitions/NewPet"
      }
    },
    {
      "name": "filename",
      "in": "formData",
      "description": "Pet to add to the store",
      "required": true,
      "schema": {
        "type": "file"
      }
    }
  ]
}

Header,
#[serde(rename = "path")]
Path,
#[serde(rename = "formData")]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just for formData rename

}
assert!(
location == v2::ParameterLocation::Body
|| location == v2::ParameterLocation::FormData
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

upgrade supported: location with FormData

let object_type = v3::ObjectType::default();
v3::SchemaKind::Type(v3::Type::Object(object_type))
}
"file" => v3::SchemaKind::Type(v3::Type::String(v3::StringType {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type: file supported;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments