Skip to content

Commit 064fba2

Browse files
Merge pull request #225 from serverlessworkflow/fix-examples
Fix and add examples
2 parents f3bf621 + 9afc4fd commit 064fba2

File tree

1 file changed

+61
-8
lines changed

1 file changed

+61
-8
lines changed

Diff for: src/pages/index.astro

+61-8
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ import { Code } from 'astro:components';
7070
<Code themes={{'light': 'github-light', 'dark': 'github-dark'}} lang="yaml" code={`document:
7171
dsl: '1.0.0-alpha5'
7272
namespace: examples
73-
name: call-http-shorthand-endpoint
73+
name: call-http
7474
version: '1.0.0'
7575
do:
7676
- getPet:
@@ -79,13 +79,13 @@ do:
7979
method: get
8080
endpoint: https://petstore.swagger.io/v2/pet/{petId}`} />
8181
</div>
82-
<input type="radio" name="code_tabs" role="tab" class="tab" aria-label="Async API" />
82+
<input type="radio" name="code_tabs" role="tab" class="tab" aria-label="AsyncAPI" />
8383
<div role="tabpanel" class="tab-content bg-base-100 border-base-300 rounded-box p-6">
84-
<h3 class="text-xl font-bold mb-4">Async API Example</h3>
84+
<h3 class="text-xl font-bold mb-4">AsyncAPI Example</h3>
8585
<Code themes={{'light': 'github-light', 'dark': 'github-dark'}} lang="yaml" code={`document:
8686
dsl: '1.0.0-alpha5'
8787
namespace: examples
88-
name: bearer-auth
88+
name: call-asyncapi
8989
version: '1.0.0'
9090
do:
9191
- findPet:
@@ -95,14 +95,67 @@ do:
9595
uri: https://fake.com/docs/asyncapi.json
9696
operationRef: findPetsByStatus
9797
server: staging
98-
message: getPetByStatusQuery
99-
binding: http
100-
payload:
101-
petId: $\{ .pet.id }
98+
message:
99+
payload:
100+
petId: $\{ .pet.id }
102101
authentication:
103102
bearer:
104103
token: $\{ .token }`} />
105104
</div>
105+
<input type="radio" name="code_tabs" role="tab" class="tab" aria-label="OpenAPI" />
106+
<div role="tabpanel" class="tab-content bg-base-100 border-base-300 rounded-box p-6">
107+
<h3 class="text-xl font-bold mb-4">OpenAPI Example</h3>
108+
<Code themes={{'light': 'github-light', 'dark': 'github-dark'}} lang="yaml" code={`document:
109+
dsl: '1.0.0-alpha5'
110+
namespace: examples
111+
name: call-openapi
112+
version: '1.0.0'
113+
do:
114+
- findPet:
115+
call: openapi
116+
with:
117+
document:
118+
endpoint: https://petstore.swagger.io/v2/swagger.json
119+
operationId: findPetsByStatus
120+
parameters:
121+
status: available`} />
122+
</div>
123+
<input type="radio" name="code_tabs" role="tab" class="tab" aria-label="gRPC" />
124+
<div role="tabpanel" class="tab-content bg-base-100 border-base-300 rounded-box p-6">
125+
<h3 class="text-xl font-bold mb-4">gRPC Example</h3>
126+
<Code themes={{'light': 'github-light', 'dark': 'github-dark'}} lang="yaml" code={`document:
127+
dsl: '1.0.0-alpha5'
128+
namespace: examples
129+
name: call-grpc
130+
version: '1.0.0'
131+
do:
132+
- greet:
133+
call: grpc
134+
with:
135+
proto:
136+
endpoint: file://app/greet.proto
137+
service:
138+
name: GreeterApi.Greeter
139+
host: localhost
140+
port: 5011
141+
method: SayHello
142+
arguments:
143+
name: '$\{ .user.preferredDisplayName }'`} />
144+
</div>
145+
<input type="radio" name="code_tabs" role="tab" class="tab" aria-label="Container" />
146+
<div role="tabpanel" class="tab-content bg-base-100 border-base-300 rounded-box p-6">
147+
<h3 class="text-xl font-bold mb-4">Container Example</h3>
148+
<Code themes={{'light': 'github-light', 'dark': 'github-dark'}} lang="yaml" code={`document:
149+
dsl: '1.0.0-alpha5'
150+
namespace: examples
151+
name: run-container
152+
version: '1.0.0'
153+
do:
154+
- runContainer:
155+
run:
156+
container:
157+
image: fake-image`} />
158+
</div>
106159
</div>
107160
</Section>
108161

0 commit comments

Comments
 (0)