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

make sequence mandate plural elements if maxOccurs is present #82

Closed
wants to merge 2 commits into from

Conversation

wiegell
Copy link

@wiegell wiegell commented Nov 9, 2024

PR Details

Make sequence maxOccurs supported on a sequence element

Description

When maxOccurs is present on a sequence, the inner elements can be repeated, so they should be of plural type

Related Issue

Fixes half of #47

Motivation and Context

I had the occurrence of an .xsd with maxOccurs on a sequence on a spec

How Has This Been Tested

Implemented test cases, tried it at my own case, where it works too. Does not seem to change other test cases.
I'm not an expert in .xsd's and the workings of xgen, but i had the feeling, that a problem could occur, where nested sequence elements could be of different types (plural vs. singular) and i should have covered that in the code, but i'm not really sure how to write a test for it - suggestions welcome.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@wiegell wiegell closed this Nov 14, 2024
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.

1 participant