Skip to content

Smithy CRUD API tips with open-api-gateway #312

Answered by cogwirrel
zetashift asked this question in Q&A
Discussion options

You must be logged in to vote

Hey! That's really awesome to hear, thank you! 😄

Say I have something like Foo and Bar resources, do I create a FooService and a BarService and each get their own lambda integration, or do I create one service Api and that service lists the Foo and Bar resources in their resources member?

I'd recommend the latter, a single service with a FooResource and a BarResource. Each SmithyApiGatewayXXXProject targets a single service and creates an API gateway API with all the operations/resources in the service. If you wanted to separate your Foo and Bar resources into completely separate API Gateway endpoints then you can create a FooService and a BarService but you'd need to create separate Sm…

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
2 replies
@zetashift
Comment options

@cogwirrel
Comment options

Answer selected by zetashift
Comment options

You must be logged in to vote
4 replies
@cogwirrel
Comment options

@zetashift
Comment options

@cogwirrel
Comment options

@zetashift
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants