-
Notifications
You must be signed in to change notification settings - Fork 5
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
#166: Add documentation to tapiro (closes #166) #167
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, left some preliminary comments
docs/tapiro/introduction.md
Outdated
- `CatsHttp4sEndpoints.scala` or `CatsAkkaHttpEndpoints.scala` depeneding on the HTTP server the user is using. | ||
|
||
The resulting routes can be simply used like this (http4s example): | ||
```scala |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this block is not typechecked
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
☝️ farei un esempio più completo che effettivamente compili
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per avere esempio completo che compili servono dipendenze, per questo stavo rimandando la cosa. Faccio prima a farlo forse.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aggiunto superesempione.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gabro pingone
@@ -0,0 +1,6 @@ | |||
--- | |||
id: rpc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
id: why
for consistency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link a blogpost è lì come tampone. Idea in un secondo momento era spiegare RPC, approccio etc, per questo l'ho chiamato così.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@gabro currently Http4s, Tapir and Http4s are not dependencies of tapiro. That's why http4s blocks are not typecheck and dependencies are not injected. I think the right way to go is to open a new issue, where we add dependencies and unit tests to check the generated code compiles and works as expected. Documentation will be updated accordingly. |
@@ -0,0 +1,6 @@ | |||
--- | |||
id: rpc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Co-Authored-By: Gabriele Petronella <[email protected]>
.as(ExitCode.Success) | ||
## Complete Example | ||
|
||
Here you have an example implementation of the `Cats` controller definied in the previous section: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you have an example implementation of the `Cats` controller definied in the previous section: | |
Here you have an example implementation of the `Cats` controller defined in the previous section: |
|
||
``` | ||
|
||
Here you have the autogenerated magic fromo tapiro (This is the content of `CatsHttp4sEndpoints.scala` it will be autogenerated). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you have the autogenerated magic fromo tapiro (This is the content of `CatsHttp4sEndpoints.scala` it will be autogenerated). | |
Here you have the http4s endpoints auto-generated by tapiro (this would be the content of `CatsHttp4sEndpoints.scala`) |
|
||
```scala mdoc | ||
import org.http4s.server.blaze._ | ||
import org.http4s.implicits._ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
serve questo import?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sì
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
magari riprovo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
confermo che serve per .orNotFound
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦♂ ok
Co-Authored-By: Gabriele Petronella <[email protected]>
Co-Authored-By: Gabriele Petronella <[email protected]>
Co-Authored-By: Gabriele Petronella <[email protected]>
Closes #2520694
Closes #166
Test Plan
tests performed
tests not performed (domain coverage)