rewiringamerica / api.rewiringamerica.org

A RESTful web API for federal, state, utility and local rebates, tax credits and other electrification incentives.
https://api.rewiringamerica.org
Apache License 2.0
7 stars 0 forks source link

Move the detailed amount field docs up a level #502

Closed oyamauchi closed 2 months ago

oyamauchi commented 2 months ago

Description

I'm working on a script that code-generates a Markdown file of response formats, for Zuplo docs. One challenge is dealing with deeply nested object structures. I've got it rendering the docs for object structures as a table if possible, but it's only possible if none of the object's fields have descriptions with newlines. (You can't have multiline values in table cells in Markdown, or at least not the subset of Markdown that Zuplo supports.)

So, to allow rendering the amount structure as a table, I'm moving the multiline part of the docs up to the top level of the structure, rather than being on the type field.

Test Plan

Generate the spec from this, use my in-progress script to render it into Markdown. Make sure the table rendered for amount looks correct.