8000 "required" parameter to be list · Issue #111 · Dorthu/openapi3 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

"required" parameter to be list #111

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

Open
nandishaivalli opened this issue Sep 1, 2023 · 1 comment
Open

"required" parameter to be list #111

nandishaivalli opened this issue Sep 1, 2023 · 1 comment

Comments

@nandishaivalli
Copy link
nandishaivalli commented Sep 1, 2023

From openAPI-3 spec of spotify.
The paths./playlists/{playlist_id}/images.put.requestBody.content.image/jpeg.schema.required path is True.
"requestBody": {
"content": {
"image/jpeg": {
"schema": {
"example": ... ,
"format": "byte",
"type": "string",
"required": true,
"description": "Base64 encoded JPEG image data, maximum payload size is 256 KB."
}
}
}

},

But the module asks it to be a list type. openapi3.errors.SpecError: Expected paths./playlists/{playlist_id}/images.put.requestBody.content.image/jpeg.schema.required to be one of [<class 'list'>], got <class 'bool'>

How to solve this?

@commonism
Copy link

Use https://github.com/sonallux/spotify-web-api/blob/main/fixed-spotify-open-api.yml

   /playlists/{playlist_id}/images:
     get:
       description: 'Get the current image associated with a specific playlist.
 
         '
       operationId: get-playlist-cover
       parameters:
…
       requestBody:
         content:
           image/jpeg:
             schema:
               description: Base64 encoded JPEG image data, maximum payload size is
                 256 KB.
               example: /9j/2wCEABoZGSccJz4lJT5CLy8vQkc9Ozs9R0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0cBHCcnMyYzPSYmPUc9Mj1HR0dEREdHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR//dAAQAAf/uAA5BZG9iZQBkwAAAAAH/wAARCAABAAEDACIAAREBAhEB/8QASwABAQAAAAAAAAAAAAAAAAAAAAYBAQAAAAAAAAAAAAAAAAAAAAAQAQAAAAAAAAAAAAAAAAAAAAARAQAAAAAAAAAAAAAAAAAAAAD/2gAMAwAAARECEQA/AJgAH//Z
-              format: byte
-              required: true
+              format: base64
               type: string
+        required: true

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
0