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

Document all the fields #499

Closed oyamauchi closed 3 months ago

oyamauchi commented 3 months ago

Description

Added description strings for almost all the request and response fields of all endpoints.

I didn't describe all the possible items enum values. That's going to be very long, and I think is best left for its own separate page. I'll add a link to that page from the doc string, once it's ready.

There are some other OpenAPI hygiene changes like adding summaries for endpoints (which makes them show up better in doc generators), and adding operation IDs.

I snuck in two substantive changes:

Test Plan

Use a work-in-progress script I have that merges the spec generated from /spec.json into Zuplo's config file. The result is deployed here:

https://api-main-4ba10f3.d2.zuplo.dev/docs

That doesn't show the descriptions of response fields and subfields (a known shortcoming of Zuplo). However, you can use third-party doc generator tools with the OpenAPI spec. Here are two examples:

In both of those, enter this URL in the "try it" box to see the docs:

https://api-main-4ba10f3.d2.zuplo.dev/spec.json