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 union and enum doc and refine logic #389

Merged
merged 30 commits into from
Mar 22, 2024
Merged

Conversation

tadelesh
Copy link
Member

@tadelesh tadelesh commented Mar 8, 2024

fix: #379
resolve: #385

@azure-sdk
Copy link
Collaborator

All changed packages have been documented.

@azure-sdk
Copy link
Collaborator

@tadelesh
Copy link
Member Author

@iscai-msft I saw you rollbacked my change for union as enum with hierarchy. I'm wondering do we have the agreement of erasing the hierarchy types and flattened into one layer of enum? It will break JS RLC, since the type has been changed. For the following example, I don't think we could omit BaseEnum and just generate ExtendedEnum as enum. I prefer to generate ExtendedEnum as union and BaseEnum as enum. Also, do we have the agreement of not generating anonymous union as enum? I don't like the inconsistency.

union BaseEnum {
  string,
  EnumValue1: "value1",
}

union ExtendedEnum {
  BaseEnum,
  EnumValue2: "value2",
}

@iscai-msft
Copy link
Contributor

@tadelesh this was after talking with @lmazuel , but I'm going to start a discussion in dpg sync about this

@iscai-msft
Copy link
Contributor

here's the gist I wrote up https://gist.github.com/iscai-msft/4174b2e13811c13d91af86c1296e9ed1

@tadelesh
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@tadelesh tadelesh changed the title rollback change of union as enum with hierarchy Add union and enum doc and refine logic Mar 22, 2024
@tadelesh
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@iscai-msft iscai-msft enabled auto-merge (squash) March 22, 2024 22:19
@iscai-msft iscai-msft merged commit 0939bc2 into main Mar 22, 2024
14 checks passed
@iscai-msft iscai-msft deleted the fix_union_enum_hierarchy branch March 22, 2024 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
9 participants