Closed stevenxuwoss closed 1 year ago
Thanks! I'll try to have a look at the issue this weekend.
@stevenxuwoss I just realized I haven't looked at this issue; please apologize. Is it still critical to you?
@mristin I had the same problem sadly.
@nicolasassi thanks for letting me know! I'll try to have a look at this tomorrow (Monday).
Hi @nicolasassi , Unfortunately, I got swamped with work & mixed in holidays, so I didn't have time to look into this problem. At the moment, I do not have time to fix this issue.
However, if you'd like to make a pull request, I'd be more than glad to support you, introduce you to the code and review your changes.
Also running into the same issue
@salmanee could you please post a minimal schema that causes the error?
@mristin This is a small snippet.
"definitions": {
"definition_one": {
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "......"
},
.......
The three last lines is where I get this error. It seems like it's only expecting string for descriptions.
@mristin Apologies for the mess above, it's my first PR. Next time I won't include the Issue # in my Fork commits...
Essentially, the {}["description"]: value is str... (If required) should be below the other checks. The schema validation accurately analyses if "description" must be a string, and errors as required. Here, checking if the "description" value is a string only appears to be needed to trigger .strip() for documentation, not to determine the validity of the "description" values type.
@AkuPython thanks a lot again for your fix! I merged it in and released the patch version 5.0.1.
Please re-open if the issue re-surfaces.
if definitions properties has name with description, will cause this issue
(@mristin, 2021-10-27: added markers for multi-line code)