mourningdove/api
2026-05-24 01:03:05 +00:00
..
dist first! 2026-05-24 01:03:05 +00:00
src first! 2026-05-24 01:03:05 +00:00
build.js first! 2026-05-24 01:03:05 +00:00
README.md first! 2026-05-24 01:03:05 +00:00

This folder contains the YAML files used to generate and validate OpenAPI routes for Dreamwidth, and to build the spec file supplied to end users. src contains the files you should edit - reusable components should go into src\components\ and can then be referenced using JS Schema reference notation (eg, $ref: components/schemas/username.yaml). This cuts down on items that need to be retyped, and keeps descriptions of items consistent across different endpoints. dist contains the compiled YAML files that are used by the Perl endpoint controllers. Because YAML has no mechanism for file includes, there is unfortunately still a manual step required to rebuild the dist files when the src files are changed. First install node and then the necessary packages (npm install from inside this folder), and then run the build.js file (node build.js). This will compile the YAML files, and print any errors encountered along the way to the terminal.