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

Generate a default value for class parameters of `anyAttribute` #470

Merged
merged 2 commits into from Mar 19, 2018

Conversation

Projects
None yet
2 participants
@hosamaly
Contributor

hosamaly commented Mar 19, 2018

Usually, generated classes have an attributes: Map parameter that defaults to an empty Map. However, a map generated for anyAttribute wasn't given a default value.

This commit adds a default value in that case.

There is also the trivial improvement of using Map.empty instead of Map.apply().

hosamaly added some commits Mar 19, 2018

Generate a default value for class parameters of `anyAttribute`
Normally, generated classes have an `attributes: Map` parameter that
defaults to an empty Map. However, a map generated for `anyAttribute`
wasn't given a default value. This commit adds a default value in that
case.

There is also the trivial improvement of using `Map.empty` instead of
`Map.apply()`.
Fix the schema uri in any_attribute_default_value.xsd
It doesn't affect anything but just for the sake of consistency.

@eed3si9n eed3si9n merged commit 733ecdc into eed3si9n:master Mar 19, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@hosamaly hosamaly deleted the hosamaly:default-value-for-anyattribute branch Mar 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment