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

More extensive use of omitempty #118

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

skoczko
Copy link

@skoczko skoczko commented Apr 16, 2024

Add "omitempty" for attributes where "use" is empty (as it defaults to "optional" per XSD spec).
Add "omitempty" for elements where minOccurs=0
Minor cleanups in the Makefile, add targets to generate schema for XML testing.
Add XML un/marshal test for the example schemas: namespace changes in the test schemas are merely to avoid collisions when pre-generating Go structs. Only one test for "complex" added, more can be added later.

Add "omitempty" for attributes where "use" is default (optional).
Add "omitempty" for elements where minOccurs=0
Minor cleanups in the Makefile.
Add XML un/marshal test for the example schema.
@skoczko skoczko changed the title Better omitempty More extensive use of omitempty Apr 18, 2024
@skoczko
Copy link
Author

skoczko commented Apr 22, 2024

@isimluk any chance to get this reviewed? This is especially problematic when the schema includes optional datetime elements for which "empty" is not a correct value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant