Currently the openapi.json file generated in this repo by npm run bundle-swagger does not match the one used in the docs repo. To bring them back together these changes are needed. (and possibly more)
Update the documentation in the /src/swagger directory
[x] add level field to the example spells on these endpoints:
/api/classes/:index/spells
[x] confirm the level field does not exist on responses from these endpoints
/api/classes/:index/levels/:level/spells
/api/subclasses/:index
Looks like level was added to these two places in the docs, but shouldn't be there. I tested by comparing the curl response to the schema definition on the prod site, and then again running the docusaurus project locally
[x] confirm that proficiency_bonus should exist on the /api/monsters/{index} response
[x] confirm that image should exist on the /api/magic-items/:index response
[x] remove enum and typo in alignment(s) on the /api/monsters/:index
Generate new spec
[x] un-gitignore the generated openapi spec
[x] npm run bundle-swagger
here the output of npm run bundle-swagger should be our new source of truth
Update the docs repo
[x] Manually copy the newly generated src/swagger/dist/openapi.json file to the docs repo
(?) maybe see if its easy to fetch the schema file from github instead not easy
[x] Rebuild in the docs repo, test, and check in changes
Currently the openapi.json file generated in this repo by
npm run bundle-swagger
does not match the one used in the docs repo. To bring them back together these changes are needed. (and possibly more)Update the documentation in the
/src/swagger
directory[x] add
level
field to the example spells on these endpoints:/api/classes/:index/spells
[x] confirm the level field does not exist on responses from these endpoints
/api/classes/:index/levels/:level/spells
/api/subclasses/:index
level
was added to these two places in the docs, but shouldn't be there. I tested by comparing thecurl
response to the schema definition on the prod site, and then again running the docusaurus project locally[x] confirm that
proficiency_bonus
should exist on the/api/monsters/{index}
response[x] confirm that
image
should exist on the/api/magic-items/:index
response[x] remove enum and typo in
alignment(s)
on the/api/monsters/:index
Generate new spec
npm run bundle-swagger
Update the docs repo
src/swagger/dist/openapi.json
file to the docs repo(?) maybe see if its easy to fetch the schema file from github insteadnot easy