fluent-bit icon indicating copy to clipboard operation
fluent-bit copied to clipboard

Create a JSON Schema for YAML Config and publish to SchemaStore

Open JustinGrote opened this issue 1 year ago • 5 comments

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

JustinGrote avatar Aug 27 '24 17:08 JustinGrote

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.

JustinGrote avatar Aug 27 '24 21:08 JustinGrote

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.

JustinGrote avatar Aug 27 '24 21:08 JustinGrote

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

image

JustinGrote avatar Aug 28 '24 23:08 JustinGrote

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.

github-actions[bot] avatar Dec 15 '24 02:12 github-actions[bot]

Still. Active.

JustinGrote avatar Dec 20 '24 17:12 JustinGrote

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.

github-actions[bot] avatar Mar 25 '25 02:03 github-actions[bot]

Still-Active. @edsiper please label with exempt-stale

JustinGrote avatar Mar 25 '25 02:03 JustinGrote

+1 FYI, vector supports json schema recently, and it's really helpful.

  • https://github.com/SchemaStore/schemastore/blob/6dc4ebbeffe56435cb4ffc3c4671aaaeeff4996a/src/schemas/json/vector.json

sh-cho avatar Apr 18 '25 01:04 sh-cho

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.

github-actions[bot] avatar Jul 17 '25 02:07 github-actions[bot]

Not stale

JJGadgets avatar Jul 17 '25 03:07 JJGadgets

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.

github-actions[bot] avatar Oct 24 '25 02:10 github-actions[bot]

Not stale

vchirikov avatar Oct 24 '25 13:10 vchirikov