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

As "required:true" parse error when it in requestBody's properties? But openai plugin validate passed. #818

Open
ezhishui opened this issue Jul 3, 2023 · 0 comments

Comments

@ezhishui
Copy link

ezhishui commented Jul 3, 2023

Such as plugin like this:

https://qr.mixerbox.com/.well-known/openapi.json

When i parse the openapi.json with kin-openapi tools, the error was :panic: error unmarshaling JSON: while decoding JSON: json: cannot unmarshal bool into Go struct field TBis.paths of type []string. I confirmed that is was cause by

"requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "url": {
                                        "type": "string",
                                        "description": "The link provided by the user, used for converting to QRcode.",
                                        "required": true -----this property cause,by this plugin is valid in openai plugin center,why?
                                    },
                                    "darkColor": {
                                        "type": "string",
                                        "description": "The default value is #000000, color of the dark module. The value must be in hex format (RGB)."
                                    }

And if i remove "required": true to the properties level ,and changed to array, it was validated passed with kin-openai, why it is a valid yaml in openai?3.0.1 or 3.1.0 specs?

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

1 participant