Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Migrate to API contract usage #1111

Merged
merged 6 commits into from
Mar 24, 2025
Merged

feat: Migrate to API contract usage #1111

merged 6 commits into from
Mar 24, 2025

Conversation

kibertoad
Copy link
Collaborator

No description provided.

pathResolver: () => '/users',
description: 'Create user',
})

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ilya-levin-lokalise Does storing contract next to controller/route make sense to you, or you would put them into separate files, e. g. contract closer to schemas?

Copy link
Contributor

@CarlosGamero CarlosGamero Mar 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it is not a question for me, so sorry for jumping in 😓

Just to share my 2 cents, in my opinion, and ideally, we will have a package with the client for the service, and the schemas and API contracts should live there so we make sure both are always in sync. Wondering if we should prepare the template with that structure 🤔. Although, this can be done in a separate PR

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but I think you are right, we should optimize for the use-case of reusing the contract outside of the service, so it makes sense if the initial structure is built around that idea. thanks, I'll adjust the code

 into feat/api-contracts

# Conflicts:
#	package-lock.json
 into feat/api-contracts

# Conflicts:
#	package-lock.json
#	package.json
@kibertoad kibertoad merged commit 8f910e6 into main Mar 24, 2025
3 checks passed
@kibertoad kibertoad deleted the feat/api-contracts branch March 24, 2025 10:35
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.

None yet

2 participants