1
0
forked from Cutlery/immich
2023-07-07 20:49:18 -05:00

1.1 KiB

OpenAPI

Immich uses the OpenAPI standard to generate API documentation. To view the published docs see here.

Generator

OpenAPI is used to generate the client (Typescript, Dart) SDK. openapi-generator-cli can be installed here. The generated SDK is based on the immich-openapi-specs.json file, which is autogenerated by the server when running in development mode. The immich-openapi-specs.json file can be modified with @nestjs/swagger decorators used or referenced by controller endpoints. See the NestJS OpenAPI docs for more info. When you add a new endpoint or modify an existing one, you must run the command below to update the client SDK.

npm run api:generate # Run from the `server/` directory

You can find the generated client SDK in the web/src/api for Typescript SDK and mobile/openapi for Dart SDK.

:::tip This can also be run via make api from the project root directory (not in the server folder) :::