Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Deprecate WallID as direct child under Side #345

Merged
merged 10 commits into from
Jun 11, 2021
Merged

Conversation

JieXiong9119
Copy link
Contributor

@JieXiong9119 JieXiong9119 commented May 11, 2021

See proposal.

Resolves #233

BuildingSync.xsd Outdated
@@ -1179,7 +1179,6 @@
</xs:complexType>
</xs:element>
<xs:choice>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need the choice element to avoid breaking change to Audit Template? Per this comment: #223 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should remove xs:choice, Mark's comment was saying he preferred that users could choose between WallID or WallIDs. But we are removing that choice completely now, so the xs:choice element is no longer needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense. I removed xs:choice.
Another issue is that deleting the choice of directly using WallID causes validation failures to all examples, as they all don't use WallIDs.

@JieXiong9119 JieXiong9119 linked an issue May 11, 2021 that may be closed by this pull request
BuildingSync.xsd Outdated
@@ -1179,7 +1179,6 @@
</xs:complexType>
</xs:element>
<xs:choice>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should remove xs:choice, Mark's comment was saying he preferred that users could choose between WallID or WallIDs. But we are removing that choice completely now, so the xs:choice element is no longer needed.

<xs:complexType>
<xs:sequence>
...
<xs:choice>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks like we need to remove choice here too

Copy link
Contributor Author

@JieXiong9119 JieXiong9119 May 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. I just updated the proposal.

`WallIDs` was added as an `xsd:choice` element in [#223](https://github.com/BuildingSync/schema/pull/223) to allow multiple `auc:WallID`s referenced for a `auc:Side` element (unbounded). This made the single `auc:WallID` reference choice redundant, so we propose to remove it.
On the other hand, to avoid breaking change for Audit Template, the `xsd:choice` element will remain.
`auc:WallIDs` was added as an `xsd:choice` element in [#223](https://github.com/BuildingSync/schema/pull/223) to allow multiple `auc:WallID`s referenced for a `auc:Side` element (unbounded). This made the single `auc:WallID` reference choice redundant, so we propose to remove it.
In addition, as `auc:WallIDs` becomes the only choice, the `xsd:choice` element is no longer needed, so we propose to remove this layer and make `auc:WallIDs` direct child under `auc:Side`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice 👍

@nllong
Copy link
Member

nllong commented May 21, 2021

@JieXiong9119 Are you planning on updating the examples so these tests will pass? Or are we waiting for @macintoshpie 's translator?

@JieXiong9119
Copy link
Contributor Author

@JieXiong9119 Are you planning on updating the examples so these tests will pass? Or are we waiting for @macintoshpie 's translator?

I'll probably update the examples first.

BuildingSync.xsd Outdated
</xs:complexType>
</xs:element>
</xs:choice>
<xs:element name="WallIDs">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<xs:element name="WallIDs">
<xs:element name="WallIDs" minOccurs="0" maxOccurs="1">

@macintoshpie
Copy link
Contributor

@JieXiong9119 can you resolve these conflicts? Once that's done we should be good to merge

@JieXiong9119
Copy link
Contributor Author

@JieXiong9119 can you resolve these conflicts? Once that's done we should be good to merge

Just did. Could you check one more time and merge it if it looks good?

Copy link
Contributor

@macintoshpie macintoshpie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@macintoshpie macintoshpie merged commit 5474647 into develop-v3 Jun 11, 2021
@macintoshpie macintoshpie deleted the deprecate/wallid branch June 11, 2021 18:42
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecate auc:WallID as direct child of auc:Side
3 participants