Skip to content

fix: "Malformed enum value" when using @scoped packages - #139

Merged
eladb merged 4 commits into
masterfrom
benisrae/enum-from-scoped
Aug 6, 2018
Merged

eladb merged 4 commits into
masterfrom
benisrae/enum-from-scoped

Conversation

@eladb

@eladb eladb commented Aug 3, 2018

Copy link
Copy Markdown
Contributor

The code that validated the format of jsii enum values was too rigid
and didn't allow "/" in type names. When using a package from an npm
scope, the enum value will look like this @scope/foo.EnumType/MemberName.

Also, add a verification that the enum member exists in the enum and fail
otherwise.

Required fix in kernel, java and dotnet runtimes.

Fixes #138

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

The code that validated the format of jsii enum values was too rigid
and didn't allow "/" in type names. When using a package from an npm
scope, the enum value will look like this `@scope/foo.EnumType/MemberName`.

Also, add a verification that the enum member exists in the enum and fail
otherwise.

Required fix in kernel, java and dotnet runtimes.
@eladb
eladb requested review from RomainMuller and mpiroc August 3, 2018 20:22
@eladb
eladb merged commit 4e70209 into master Aug 6, 2018
@eladb
eladb deleted the benisrae/enum-from-scoped branch August 6, 2018 08:38
@eladb eladb mentioned this pull request Aug 8, 2018
RomainMuller pushed a commit to aws/aws-cdk that referenced this pull request Aug 8, 2018
* Bump
* Added a `bump.sh` script ;-)

Fixes #467 (via aws/jsii#139)
Fixes #503 (via #517)
Fixes #502 (via #490)
ali-n4i pushed a commit to ali-n4i/aws-cdk that referenced this pull request Jul 29, 2026
* Bump
* Added a `bump.sh` script ;-)

Fixes aws#467 (via aws/jsii#139)
Fixes aws#503 (via aws#517)
Fixes aws#502 (via aws#490)
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.

Unable to use enums from @scoped module

2 participants