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

#166: Add documentation to tapiro (closes #166) #167

Merged
merged 20 commits into from
Mar 5, 2020

Conversation

calippo
Copy link
Member

@calippo calippo commented Feb 27, 2020

Closes #2520694

⚠️ The line above was added during the automatic migration of all github project issues to Kaiten. The old GH issue link is kept here for reference (it is now deprecated, continue follow the original issue on Kaiten).

Closes #166

Test Plan

tests performed

A Test Plan is used to show what you tested to make sure your code works fine. You should write here all that you did to test, and provide some results of your testing.

These results can be screenshots, query results, or even just pointers to unit tests that successfully passed.

tests not performed (domain coverage)

At times not everything can be tested, and writing what hasn't been tested is just as important as writing what has been tested.

An example of partial test is a field displaying 4 possible values. If 3 values are tested, with screenshots, and 1 is not, then it should be mentioned here.

@nemobot nemobot added the WIP label Feb 27, 2020
@calippo calippo requested a review from gabro February 27, 2020 15:58
@nemobot nemobot added in review and removed WIP labels Feb 27, 2020
Copy link
Member

@gabro gabro left a 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/installation.md Outdated Show resolved Hide resolved
docs/tapiro/installation.md Outdated Show resolved Hide resolved
docs/tapiro/installation.md Outdated Show resolved Hide resolved
- `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
Copy link
Member

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

Copy link
Member

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

Copy link
Member Author

@calippo calippo Mar 3, 2020

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

Aggiunto superesempione.

Copy link
Member Author

Choose a reason for hiding this comment

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

@gabro pingone

docs/tapiro/introduction.md Outdated Show resolved Hide resolved
docs/tapiro/migrate.md Outdated Show resolved Hide resolved
@@ -0,0 +1,6 @@
---
id: rpc
Copy link
Member

Choose a reason for hiding this comment

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

id: why

for consistency?

Copy link
Member Author

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ì.

Copy link
Member

Choose a reason for hiding this comment

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

👍

build.sbt Outdated Show resolved Hide resolved
@nemobot nemobot added WIP and removed in review labels Feb 27, 2020
@calippo
Copy link
Member Author

calippo commented Feb 28, 2020

@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.

docs/tapiro/migrate.md Outdated Show resolved Hide resolved
docs/tapiro/installation.md Outdated Show resolved Hide resolved
docs/tapiro/migrate.md Outdated Show resolved Hide resolved
docs/tapiro/migrate.md Outdated Show resolved Hide resolved
@@ -0,0 +1,6 @@
---
id: rpc
Copy link
Member

Choose a reason for hiding this comment

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

👍

docs/tapiro/migrate.md Outdated Show resolved Hide resolved
@giuscri giuscri mentioned this pull request Mar 4, 2020
.as(ExitCode.Success)
## Complete Example

Here you have an example implementation of the `Cats` controller definied in the previous section:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
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:

docs/tapiro/introduction.md Outdated Show resolved Hide resolved

```

Here you have the autogenerated magic fromo tapiro (This is the content of `CatsHttp4sEndpoints.scala` it will be autogenerated).
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
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`)

docs/tapiro/introduction.md Outdated Show resolved Hide resolved

```scala mdoc
import org.http4s.server.blaze._
import org.http4s.implicits._
Copy link
Member

Choose a reason for hiding this comment

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

serve questo import?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

magari riprovo

Copy link
Member Author

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

Copy link
Member

Choose a reason for hiding this comment

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

🤦‍♂ ok

calippo and others added 2 commits March 5, 2020 12:50
Co-Authored-By: Gabriele Petronella <[email protected]>
Co-Authored-By: Gabriele Petronella <[email protected]>
docs/tapiro/introduction.md Outdated Show resolved Hide resolved
Co-Authored-By: Gabriele Petronella <[email protected]>
@nemobot nemobot added in review and removed WIP labels Mar 5, 2020
@calippo calippo merged commit f2f50e1 into master Mar 5, 2020
@nemobot
Copy link

nemobot commented Mar 5, 2020

@nemobot nemobot removed the in review label Mar 5, 2020
@calippo calippo deleted the 166-add_documentation_to_tapiro branch March 5, 2020 12:14
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.

Add documentation to tapiro
4 participants