trolie / spec

Transmission Ratings and Operating Limits Information Exchange
https://trolie.energy/
Other
2 stars 2 forks source link

clean up and refactor #32

Closed caindy closed 5 months ago

caindy commented 5 months ago

The immediate impetus for this change was to use the application/problem+json response for 400s, but I took the opportunity to apply the head/get refactoring for those paths that have HEAD defined.

I was careful not to introduce or to remove a 410 Gone response where it seemed inappropriate. Reference data comes to mind.

There remains a need to clean up or refactor a few paths that were left mostly as-is because they didn't have a HEAD.

caindy commented 5 months ago

I have a much cleaner what to reuse responses that I'm going to push to this branch today.

caindy commented 5 months ago

There are still a couple of constants to pull out, but this is substantively done. I was able to remove 1200 lines and get rid of a lot of warnings from the linters.

caindy commented 5 months ago

The main things here are: