Skip to content

Idea: Add root-level scripts and openapi folders to the monorepo #1601

@lightwalker-eth

Description

@lightwalker-eth

Background

  • In feat(docs): OpenAPI spec sync with CI validation and PR previews #1550:
    • openapi.json files are being explicitly added to the monorepo
    • scripts are being added for fetching an autogenerated openapi.json file from ENSApi
    • The related openapi.json output file and scripts for fetching it currently live within the scope of specific apps / packages.
  • We can note how the openapi.json file and the scripts for generating it should in theory not live within the scope of specific apps / packages. They represent interfaces between apps. Ex: they may be generated by script A from app B, but then consumed by X, Y, and Z.
  • Related issue Set foundation for multiple OpenAPI.json files #1600 which notes how we'll be adding multiple openapi.json files and scripts for generating those to the ENSNode monorepo in the future.

Goals

  • Organize the openapi.json files and their related autogeneration scripts in a more neutral place within the monorepo that's not scoped to a single app / package. These files and their related scripts span multiple apps / packages.
    • Possible counterargument: What if we created a new package under /packages just for each app's openapi.json file? Maybe this approach might be useful for some future tooling we might add? For example, anything that might want to import the related openapi.json from a TypeScript file could just make a standard import statement to grab it as a JSON object. This could both work in our monorepo and also for any app outside of our monorepo. I'm open to this approach.
    • Open question: For the committed openapi files that the Mintlify site needs to read to build itself, how should we manage this? Could we solve it using the package strategy as referenced in the bullet point above? Or if that didn't work, what about something like a symlink from some file in the Mintlify docs directory to the related committed openapi file?

Advice appreciated.

Metadata

Metadata

Assignees

Labels

devopsDevOps relateddocsDocs related

Type

Projects

Status

Todo

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions