Skip to content

Is there an interface for getting schema information directly? #497

Closed Answered by bioball
tropicbliss asked this question in Q&A
Discussion options

You must be logged in to vote

You can get this information from the reflect API, which you can then render into JSON/YAML/whatever else.

Alternatively, if you are in Java, you can use org.pkl.core.Evaluator#evaluateSchema to get a schema object.

BTW: What are you looking to do codegen for?

NOTE: there is a bug that prevents you from rendering reflect values in 0.25 that is now fixed in 0.26.0-dev (docs for downloading dev executables here: https://pkl-lang.org/main/latest/pkl-cli/index.html#download)

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by tropicbliss
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants