diff --git a/README.md b/README.md index 90651cd5c8..e05a838d79 100644 --- a/README.md +++ b/README.md @@ -16,3 +16,24 @@ Development ```bash $ yarn run dev ``` + +API Packages +------------ + +Since it's not entirely clear yet how APIs will develop in future, the approach +taken here is to package individual APIs up individually. That is, instead of +providing an overall API version in `api-base.yml`, it should be part of each +API package's path. + +For example, for a `foo` API in its version `v1`, its definitions should live +in `./paths/foo/v1.js` and `./paths/foo/v1/*.js` respectively. + +Interface/implementation +------------------------ + +For reusability across API versions, it's best to keep files in the `paths` +subfolder very thin, and instead inject implementations via the `dependencies` +configuration value of `express-openapi`. + +These implementations line to the `./lib` subfolder. Adjust `server.js` as +needed to make them available to API packages.