-
Notifications
You must be signed in to change notification settings - Fork 132
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
Unknown type for the following structure (type: string, class: io.swagger.v3.oas.models.media.PasswordSchema) #255
Comments
Ok i think i figured it out for password (see #256 ) ... but i have same problem with |
this is an example of the offending yml... get:
summary: get timezone data
operationId: getTimezoneData
description: |-
Get timezone data (also called tzdata)
responses:
200:
description: Succesfully retrieved tzdata.
schema:
description: User specific tzdata file.
type: file i assume raw response could be used for this but this fails the compilation ... i wonder how to solve this ... perhaps generate response that takes |
What's the compiler error? We've supported |
@tomasherman akka-http has support for This isn't a great solution though, I'd much rather go with something |
the error for file comes during code generation phase:
|
This is likely related to case GetType(model) =>
val determinedType = Option(model.getType()).fold("No type definition")(s => s"type: $s")
val className = model.getClass.getName
Target.fromOption(
Option(model.getType()),
s"""|Unknown type for the following structure (${determinedType}, class: ${className}):
| ${model.toString().lines.filterNot(_.contains(": null")).mkString("\n ")}
|""".stripMargin
) where Could you try using an OpenAPI 3.x spec to reproduce? Alternately, I'm realizing that we don't have any tests for |
i can provide some failing test case, but is there any chance any of you guys could take a stab at this? I am already battling in two other merge requests and i don't have any more time to invest :( |
I can't promise I can get to it this week, unfortunately. Thank you for your efforts iterating on your other PRs, by the way 😄 |
well, we either have to make it work for our use cases, or use python at work ... so not really much choice :D but thanks for the guidance ... i might get to it after all, i think i made good progress on the other PRs |
Another failure example, if it helps, otherwise this just a self-serving +1 to having the same issue. responses:
'200':
description: OK
content:
image/png:
schema:
type: string
format: binary
image/jpeg:
schema:
type: string
format: binary
application/pdf:
schema:
type: string
format: binary Produces the error:
|
I wonder how |
#255 improvement - Fixed issue with type:file
There's a similar issue with the format type |
I am running into a similar issue with type: array
[31mError:�[0mUnknown type for the following structure (No type definition, class: io.swagger.v3.oas.models.media.Schema):
|
@nick-bauer: What's the context around |
Following up, as this bit one of my coworkers -- It turns out that the assumption of |
#1407 improves the situation referred to by @nick-bauer -- I unified the different type transformation logic, which was causing issues with Closing this, thank you 🙂 |
Update This issue is tracking errors generated by following schemas:
They all generate errors similar to this one:
Original issue:
Hi,
when using follwing definition:
I get the following error:
Any idea what to do about it? I suspect it's a format that has been removed in swagger v3 or something like that
The text was updated successfully, but these errors were encountered: