Open gashcrumb opened 6 years ago
If I understand correctly, this ambiguity is only in XML Schema, as JSON always have an unnamed root bracket.
Makes sense, so this field only needs to be present when one of the XML kinds is selected.
I think even XML instance document doesn't have this ambiguity as XML document only allows single root element. If the user-provided XML instance document contains multiple root elements, that is invalid XML document and should end up with validation error. It's XML Schema doesn't define a root element in itself.
This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions!
This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions!
If I understand atlasmap schemasets correctly, we can solve this by creating a schemaset with a chameleon (no namespace) root schema, that just has an element with an element ref
/type
reference to the real schema in additionalSchemas
.
At least that's how I intend to solve this problem for the SOAP Connector issue #6504.
That "creating chameleon schema" could be a workaround that user can do manually. This issue is to assist choosing a root element from UI instead. Generic XML schema can have multiple top elements defined in each schema, therefore atlasmap can't determine which one to be used for data shape. WSDL defines which is the element to be used in itself, so SOAP doesn't hit this problem.
Syndesis UI code can specify root element name as a part of data shape initialization parameter DocumentInitializationModel
https://github.com/atlasmap/atlasmap/pull/362/files#diff-881a05f693105e2d79919cd3a45b3e5aR164
This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions!
This is a...
The problem
In the describe data design there's a control the user can use to indicate the root element of the document they're submitting. I guess this would be most useful if the user is submitting a schema document, and the actual type they want to use is in that document.
Screenshot
This control is present in many of the screenshots, labeled
Specify Root Element
-> https://github.com/syndesisio/syndesis/blob/master/ux/designs/describe-data/img/describe-data-define-urlerror.pngAPI Endpoints and Schemas
TBD
Tasks involved / Steps to Reproduce
First off we need to identify if this is something that can be done in the UI or if we'll need backend support. The frontend could for example use a library to help with the XML parsing etc. however there's likely going to be issues with large files. It may be better to implement a backend service to provide possible document roots for XML and JSON schema and instance documents. Once that's figured out we can update this area with a more defined list of tasks
Follow on from #1229