Open jakestrouse00 opened 1 day ago
Hey there,
I’ve briefly reviewed the code you provided, and there are a few points that need your attention.
The code is referencing a tag named rere
, which is not part of the given example.
The type for context
is declared as List[int | str | str]
, but the actual sub-elements for each choice are of type Element
. This discrepancy needs to be addressed.
If you’re still encountering issues after resolving the above, you may want to reconsider the object’s structure as described in the following point.
I found the contextual data challenging to follow. It seems that using a context object with optional attributes would provide guest information more intuitively, rather than relying on checking the object type. Why do I bring this up? First, determining what data was provided this way seems unconventional. And second, the main reason:
I hadn’t considered the option of wrapping the type Elements
. It could work, but my original intention for the wrapper argument was to handle structures like this:
<Context>
<rere>...</rere>
<rere>...</rere>
<rere>...</rere>
</Context>
Hi,
I am trying to define an element that contains multiple sub-elements (some of the sub-elements also contain multiple sub-elements). The XML I am aiming for looks like this:
This is currently what I have written, but when submitting a request I get a 400, Bad Request with the response:
{ "detail": "There was an error parsing the body" }
Any help would be greatly appreciated