finatra-swagger
finatra-swagger copied to clipboard
Could you add formParam back in open api 3.0
Hi, jakehschwartz:
traced this commit that formParam have been removed https://github.com/jakehschwartz/finatra-swagger/commit/50dc183052473f24f27c1cbdf2da3a97503bd12e
how can we add it back?
Hey, it was removed because it didnt look like it was supported anymore. If you can show me what it is called in the OpenAPI specification, I can try adding it back. Thanks!
On Sun, Jun 6, 2021 at 11:31 PM chenghsienwen @.***> wrote:
Hi, jakehschwartz:
traced this commit that formParam have been removed 50dc183 https://github.com/jakehschwartz/finatra-swagger/commit/50dc183052473f24f27c1cbdf2da3a97503bd12e
how can we add it back?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jakehschwartz/finatra-swagger/issues/72, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVAOZ2USSGEOV2MXISXQIDTRQ4QNANCNFSM46GXVPQQ .
I tried to add it at https://github.com/chenghsienwen/finatra-swagger/commit/6f062d2beb278d1c969bd403b10608b261739042
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
}
}
}
@chenghsienwen Do you need to register the schema, like in the bodyParam function thats above yours?
@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