Skip to content

docs(openapi): preview for #25185#25479

Closed
timonrieger wants to merge 1 commit intoimmich-app:mainfrom
timonrieger:docs/openapi-preview
Closed

docs(openapi): preview for #25185#25479
timonrieger wants to merge 1 commit intoimmich-app:mainfrom
timonrieger:docs/openapi-preview

Conversation

@timonrieger
Copy link
Collaborator

@jrasm91 as discussed on Discord and #25185 . Here is the proposal:

  • only update dtos
  • don't use jsdoc as this has no openapi capabilities, instead use the built-in ApiProperty from @nestjs/swagger
  • don't add descriptions to endpoints/controllers (yet 😄 )

If you accept this, I will go update #25185 (or recreate it) with this proposal

@immich-push-o-matic
Copy link

immich-push-o-matic bot commented Jan 23, 2026

Label error. Requires exactly 1 of: changelog:.*. Found: 🗄️server. A maintainer will add the required label.

@jrasm91
Copy link
Member

jrasm91 commented Jan 23, 2026

Yes, that all looks great. Although, can you use @Property instead of @ApiProperty? It's our custom one which supports adding history via new HistoryBuilder().added('v2.5.0').beta('v2.5.0'). If you are going to update a lot of properties, you probably can go ahead and add added('v2').stable('v2') at the same time.

@timonrieger
Copy link
Collaborator Author

Although, can you use @Property instead of @ApiProperty? It's our custom one which supports adding history via new HistoryBuilder().added('v2.5.0').beta('v2.5.0').

I just searched through the codebase and saw that the HistoryBuilder() is being applied to exclusively Endpoint decorators. I don't understand the link to the (Api)Property here. Could you clarify?

@Endpoint({
summary: 'Create user profile image',
description: 'Upload and set a new profile image for the current user.',
history: new HistoryBuilder().added('v1').beta('v1').stable('v2'),
})

@jrasm91
Copy link
Member

jrasm91 commented Jan 24, 2026

https://github.com/immich-app/immich/blob/main/server%2Fsrc%2Fdtos%2Fperson.dto.ts#L117

@timonrieger
Copy link
Collaborator Author

closing this at it just served as the proposal

@timonrieger timonrieger deleted the docs/openapi-preview branch January 24, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants