Unknown type for the following structure (type: string, class: io.swagger.v3.oas.models.media.PasswordSchema)
See original GitHub issueUpdate This issue is tracking errors generated by following schemas:
swagger: "2.0"
info:
title: Whatever
version: 1.0.0
host: localhost:1234
schemes:
- http
definitions:
Foo:
type: object
properties:
somePassword:
type: string
format: password
someFile:
type: file
someBinary:
type: string
format: binary
They all generate errors similar to this one:
Error: Unknown type for the following structure (type: string, class: io.swagger.v3.oas.models.media.PasswordSchema):
class PasswordSchema {
class Schema {
}
type: string
format: password
}
Original issue:
Hi,
when using follwing definition:
{"password":{"format":"password","type":"string"}}
I get the following error:
Error: Unknown type for the following structure (type: string, class: io.swagger.v3.oas.models.media.PasswordSchema):
class PasswordSchema {
class Schema {
}
type: string
format: password
}
Any idea what to do about it? I suspect it’s a format that has been removed in swagger v3 or something like that
Issue Analytics
- State:
- Created 4 years ago
- Comments:17 (14 by maintainers)
Top Results From Across the Web
Unknown type for the following structure (type: string, class: io ...
Unknown type for the following structure (type: string, class: io.swagger.v3.oas.models.media.PasswordSchema) #255.
Read more >Data Types - Swagger
OAS 3 This guide is for OpenAPI 3.0. Data Types. The data type of a schema is defined by the type keyword, for...
Read more >Swagger declaration schema = @Schema(implementation ...
I have one API endpoint, the request body expects a HashMap. There is not much information on how to fix the "Example value"...
Read more >Uses of Class io.swagger.v3.oas.models.media.StringSchema
Methods in io.swagger.v3.oas.models.media that return StringSchema. Modifier and Type, Method and Description. StringSchema, StringSchema.
Read more >Uses of Class io.swagger.v3.oas.models.media.Schema
returns the schemas property from a Components instance. Methods in io.swagger.v3.oas.models with parameters of type Schema. Modifier and Type ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Gipetto i believe i patched this issue with #283 but i think further improvements on how binary properties should be handled are in order
#1407 improves the situation referred to by @nick-bauer – I unified the different type transformation logic, which was causing issues with
$refs
inside ofarray
.Closing this, thank you 🙂