FusionAuth / fusionauth-issues

FusionAuth issue submission project
https://fusionauth.io
88 stars 12 forks source link

Kickstart YAML #1264

Open elliotdickison opened 3 years ago

elliotdickison commented 3 years ago

Provide Kickstart config as yaml

Problem

I love the Kickstart feature. I love JSON. IMO the two don't mix super well though. The biggest pain point for me is the lack comment support in JSON. My kickstart.json file is getting pretty massive and I would love to be able to add comments to remind me what each API call does and why.

Solution

Support for yaml Kickstart configuration. This would include the ability to point FUSIONAUTH_APP_KICKSTART_FILE at a yaml file and the ability to have kickstart.yaml be auto-detected (for backwards compatibility this file would probably be second in priority to kickstart.json if both exist).

Alternatives/workarounds

I'm currently planning to add a pre-processing step that converts a kickstart.yaml file to kickstart.json before firing up FusionAuth for local development.

Community guidelines

All issues filed in this repository must abide by the FusionAuth community guidelines.

How to vote

Please give us a thumbs up or thumbs down as a reaction to help us prioritize this feature. Feel free to comment if you have a particular need or comment on how this feature should work.

robotdan commented 3 years ago

This could be cool... but to be honest, I doubt we will ever do this. We would have to re-write our kickstart parser (it is a custom multi-pass parser to support variables, and includes) and then add in another dependency to parse YAML.

Another option would be for you to break apart your kickstart file into includes and sub-directories and then add README files to describe how you are using each part.

Another option would be for us to support a comment / description field in the kickstart file or perhaps even per request to allow you to document things and in turn we'd just ignore these fields.

Would one of these two options help?

robotdan commented 3 years ago

@voidmain and I were kicking this around, there may be a way for us to support this in the future w/out too much effort. Not a high priority at the moment, but we will consider it.

Thanks!

elliotdickison commented 3 years ago

Thanks for the response! TBH for my needs in particular I don't see a ton of value to either of those solutions. Separate README.md file would be fine for high-level comments, but pretty unhelpful for comments on the level of "this particular config line is here because of X" (although cool to know you can split up files - I didn't realize that). A comment field in json would mean max one comment per json object and syntax highlighting wouldn't be particularly helpful. My workaround (yaml -> json preprocessing) has been working great so far and it was trivial to setup so I'd probably just stick with that over either of those solutions.

Would you have to rewrite your parser? I was thinking something more on the lines of building the yaml pre-processing into fusionauth which would let you keep all your existing json code as-is. Like I said though, not a huge deal as it was easy for me to setup myself.