Skip to content

Conversation

@ryantxu
Copy link
Collaborator

@ryantxu ryantxu commented Feb 14, 2024

This is an easy example generating schema from go structs. See: grafana/grafana-plugin-sdk-go#897

This puts the results in static/schema/query.types.json -- the structure and tooling for this folder is still TBD, but it does not hurt anything to merge before the whole pipeline exists (and also helps to have a basic real example living somewhere!)

See also grafana/grafana#84032 (comment). (same question about utility of including the raw schemas)

@ryantxu ryantxu changed the title POC: Generate query spec Schema: Generate query schema from go struct Mar 6, 2024
@ryantxu ryantxu marked this pull request as ready for review March 6, 2024 19:34
@ryantxu ryantxu requested a review from a team as a code owner March 6, 2024 19:34
@ryantxu ryantxu requested review from gabor, yesoreyeram and zoltanbedi and removed request for a team March 6, 2024 19:34
err = builder.AddQueries(schemabuilder.QueryTypeInfo{
Name: "default",
GoType: reflect.TypeOf(&QueryModel{}),
Examples: []data.QueryExample{
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

any good example queries? Is there a public sheet we can stick some examples in that will always work?

@gabor gabor removed their request for review October 2, 2024 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant