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

Could you add formParam back in open api 3.0 #72

Open
chenghsienwen opened this issue Jun 7, 2021 · 4 comments
Open

Could you add formParam back in open api 3.0 #72

chenghsienwen opened this issue Jun 7, 2021 · 4 comments

Comments

@chenghsienwen
Copy link

Hi, jakehschwartz:

traced this commit that formParam have been removed
50dc183

how can we add it back?

@jakehschwartz
Copy link
Owner

jakehschwartz commented Jun 7, 2021 via email

@chenghsienwen
Copy link
Author

I tried to add it at chenghsienwen@6f062d2

according to swagger spec
https://swagger.io/docs/specification/describing-request-body/file-upload/

however, I tried to run examples but no formParam field found
but swagger.json contains form-data

       "request_body": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "description": "the student name",
                    "example_set_flag": false
                  },
                  "grade": {
                    "description": "the student grade",
                    "example_set_flag": false
                  }
                },
                "example_set_flag": false
              }
            }
          }

@jakehschwartz
Copy link
Owner

@chenghsienwen Do you need to register the schema, like in the bodyParam function thats above yours?

@chenghsienwen
Copy link
Author

@jakehschwartz thanks for remind, I have tried to register formParam in FinatraSwagger.scala, but it not works, I think form related field should declare in body request with finatra annotation, and bodyParam in FinatraOperation.scala should handle multipart/form-data related content type

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

No branches or pull requests

2 participants