Create a JSON Schema for YAML Config and publish to SchemaStore
Related to #5083, publishing the schema to schemastore would enable automatic tooling in VSCode and other editors and make it much easier for new users to start utilizing and configuring Fluent Bit.
https://github.com/SchemaStore/schemastore/blob/master/CONTRIBUTING.md#how-to-add-a-json-schema-thats-self-hostedremoteexternal
It appears I too erroneously thought that this "schema" was a JSON schema and not just a JSON that defines a schema.
Can someone assist me for where this "format" is defined and if perhaps a PR could be devised to modify -J to output JSON schema format.
Implementation is here: https://github.com/fluent/fluent-bit/blob/e37b56b2a1c75ca50c15848a945b448f7d85ee85/src/flb_help.c#L536
This definitely does not seem to build any kind of standard JSON schema format.
I created a PowerShell script to generate a schema based on fluentbit -J output. It is hosted here: https://github.com/JustinGrote/FluentBitJsonSchema
To use add the follow line to the top of your fluent bit YAML config:
# yaml-language-server: $schema=https://github.com/JustinGrote/FluentBitJsonSchema/releases/latest/download/fluentbit.schema.json
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the exempt-stale label.
Still. Active.
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the exempt-stale label.
Still-Active. @edsiper please label with exempt-stale
+1 FYI, vector supports json schema recently, and it's really helpful.
- https://github.com/SchemaStore/schemastore/blob/6dc4ebbeffe56435cb4ffc3c4671aaaeeff4996a/src/schemas/json/vector.json
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the exempt-stale label.
Not stale
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the exempt-stale label.
Not stale