You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When a jsonschema.Struct is passed to setupRequest it doesn't work. For example, when used with oc.AddReqStructure. As far as I can tell, it happens because refl.HasTaggedFields (called from ReflectRequestBody) works on the Struct's fields instead of the Field elements.
To Reproduce Here is an example for HasTaggedFields returning an incorrect answer.
Expected behavior setupRequest should work on jsonschema.Struct the same way setupResponse does.
Additional context
I'm trying to add an OpenAPI schema to an existing APIs. I don't want to rewrite all the input structs, but wanted to extend them to include the URL params. Unfortunately, this didn't work due the aforementioned issue.
The text was updated successfully, but these errors were encountered:
As a side note, it still doesn't work if jsonschema.Struct is passed directly, rather than being embedded in a struct, since the check doesn't check the input itself:
Describe the bug
When a
jsonschema.Struct
is passed tosetupRequest
it doesn't work. For example, when used withoc.AddReqStructure
. As far as I can tell, it happens becauserefl.HasTaggedFields
(called fromReflectRequestBody
) works on theStruct
's fields instead of theField
elements.To Reproduce
Here is an example for
HasTaggedFields
returning an incorrect answer.Expected behavior
setupRequest
should work onjsonschema.Struct
the same waysetupResponse
does.Additional context
I'm trying to add an OpenAPI schema to an existing APIs. I don't want to rewrite all the input structs, but wanted to extend them to include the URL params. Unfortunately, this didn't work due the aforementioned issue.
The text was updated successfully, but these errors were encountered: