Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/flb_help.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,10 +710,11 @@ flb_sds_t flb_help_build_json_schema(struct flb_config *config)
* - fluent-bit
* - customs
* - inputs
* - processors
* - filters
* - outputs
*/
msgpack_pack_map(&mp_pck, 5);
msgpack_pack_map(&mp_pck, 6);
Copy link
Contributor

Choose a reason for hiding this comment

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

Nits: This is nitpick but can we generate the number of plugin types here in the future?
This is because this is one of the magic numbers to handle specific not fixed the number of items.
So, we need to handle it with more flexible way.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll see what I can do. The best I can think of off the type of my head would be to use a static list and then use a bunch of if branches when recursing that list to add each help section.

I'll test it out later.

Copy link
Member

Choose a reason for hiding this comment

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

you can use this API which solves that problem: https://github.com/fluent/fluent-bit/blob/master/src/flb_mp.c#L258-L296


/* Fluent Bit */
msgpack_pack_str(&mp_pck, 10);
Expand Down
Loading