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

Add support for xsd:restriction #18

Open
henkesn opened this issue Jan 13, 2023 · 1 comment
Open

Add support for xsd:restriction #18

henkesn opened this issue Jan 13, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@henkesn
Copy link
Collaborator

henkesn commented Jan 13, 2023

Creating a schema from WSDL/XSD which have xsd:restriction raised an error. Would be good to have that fixed by simply ignoring the restrictions in a first step. Some cases perhaps could also be mapped to enum later.

Example:

<xs:simpleType>
  <xs:restriction base="xs:string">
   <xs:enumeration value="optional"/>
   <xs:enumeration value="required"/>
   <xs:enumeration value="prohibited"/>
  </xs:restriction>
</xs:simpleType>
@henkesn henkesn added the enhancement New feature or request label Jan 13, 2023
@pso-aeb
Copy link
Collaborator

pso-aeb commented Mar 14, 2023

XSD-Doc: https://www.w3schools.com/xml/schema_facets.asp
Should use the base as type for the field.
Map to enum seems plausible.
All other possible restrictions don't have a proper correspondence in GraphQL (AFAIS). But we could put them in the comment for the field.

henkesn added a commit that referenced this issue Jun 28, 2023
- make apis provided by the generated schema as stable as possible (introduce namespaces for types, don't return only the first operation output message part, fallback to GraphQLJSON on generation errors and incompatible xsd to preserve a working (but partly untyped) schema).
- Set a more versatile foundation for additional xsd features which can be implemented later without breaking changes.
- Fix errors around the type resolution in different namespaces.
- Remove the usage of node-soap's service descriptions because they are incomplete. Unfortunately node-soap seems to rely on them too which leads to some bugs.
- Remove specs which don't work anymore because of removed WSDL sources

Fixes #16 and partially #17 and #18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants