Skip to content

MIM-504: fetch leases by property id from leasing#291

Merged
momentiris merged 11 commits intomainfrom
mim-504
May 14, 2025
Merged

MIM-504: fetch leases by property id from leasing#291
momentiris merged 11 commits intomainfrom
mim-504

Conversation

@momentiris
Copy link
Contributor

@momentiris momentiris commented May 13, 2025

This PR adds an endpoint to fetch leases by property id from leasing.
Adapter function already existed, so I just added the endpoint.

Note
In order to add swagger docs for this endpoint to consume from property-tree (and possibly others in the future) I added a Lease zod schema.

This endeavor brought to my attention what I believe are problems with the Lease type from onecore-types. It has circular dependencies which I don't think makes sense. Lease.tenants is a list of Contact, which in turn has a list of Lease on them.

So the schema I made skips the recursive properties on lease.

@linear
Copy link

linear bot commented May 13, 2025

@henrikhenrikpersson
Copy link
Contributor

Would be nice with a test for the endpoint? 🧪

@momentiris
Copy link
Contributor Author

Would be nice with a test for the endpoint? 🧪

3c82b40

4718271

@momentiris momentiris merged commit 6bdd570 into main May 14, 2025
1 check passed
@momentiris momentiris deleted the mim-504 branch May 14, 2025 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants