nimble_options icon indicating copy to clipboard operation
nimble_options copied to clipboard

Add types to autogenerated schema docs

Open lucacorti opened this issue 2 years ago • 3 comments

Hi, this adds options types to the documentation generated with NimbleOptions.docs/2.

lucacorti avatar Aug 03 '22 22:08 lucacorti

I like this idea. However, I think:

  1. We should not show anything when the type is {:custom, ...}. Let's let the user write it down in the docs.
  2. I don't think we should put backticks around types. I think a good output is :some_option (integer) - ....
  3. You moved the "required" part alongside the type. Let's not do that. A key can be required even if :type is not in the schema. Let's revert that change.

whatyouhide avatar Aug 04 '22 05:08 whatyouhide

Formatting should now be done in the key (type) and optionally - (Required.) Documentation format.

lucacorti avatar Aug 05 '22 10:08 lucacorti

Also caught a bug with {:list, subtype}, fixed and added it to the tests. Anything else we should fix?

lucacorti avatar Aug 05 '22 12:08 lucacorti

Last round of changes should be complete.

lucacorti avatar Aug 22 '22 11:08 lucacorti

Thanks @lucacorti! 💟

whatyouhide avatar Aug 27 '22 09:08 whatyouhide