-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix hello world, use inlined files instead of strings (#1614)
- Loading branch information
Showing
7 changed files
with
14,201 additions
and
1,058 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
modules/website/src/components/sample_data/HelloWorld.smithy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
$version: "2.0" | ||
|
||
namespace smithy4s.hello | ||
|
||
service AdminService { | ||
operations: [GetUser] | ||
} | ||
|
||
@http(method: "GET", uri: "/user/{id}") | ||
operation GetUser { | ||
input := { | ||
@required | ||
@httpLabel | ||
id: String | ||
} | ||
output: User | ||
} | ||
|
||
structure User { | ||
@required firstName: String | ||
@required lastName: String | ||
} |
3 changes: 3 additions & 0 deletions
3
modules/website/src/components/sample_data/HelloWorldImpl.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
object AdminServiceImpl extends AdminService[IO] { | ||
def getUser(id: String): IO[User] = ??? | ||
} |
2 changes: 2 additions & 0 deletions
2
modules/website/src/components/sample_data/HelloWorldRoutes.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
val routes: Resource[IO, HttpRoutes[IO]] = | ||
SimpleRestJsonBuilder.routes(AdminServiceImpl).resource |
Large diffs are not rendered by default.
Oops, something went wrong.