-
My config.pkl looks like:
My schema.pkl doesn't config the top level mappings!
|
Beta Was this translation helpful? Give feedback.
Answered by
HT154
Jun 12, 2025
Replies: 2 comments 4 replies
-
You cannot have a class "merged" with a Mapping. The Mapping must be a particular property of the class: class OutputPort {
name: String
deployments: Mapping<ENV, Deployment>
} That said, in this case the valid Mapping keys are known ahead of time so you might consider "promoting" them to being nullable properties on the class instead: class OutputPort {
name: String
dev: Deployment?
int: Deployment?
uat: Deployment?
prd: Deployment?
} |
Beta Was this translation helpful? Give feedback.
3 replies
-
Not sure if you tried your code samples, but neither approach seems to work:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Neither of my suggestions do what you want because that's not possible. In both cases your config would need a slightly different structure.
The first suggestion entails putting your entries under a nested property:
The second would use properties instead of mapping entries: