Skip to content

Commit 6ba859d

Browse files
committed
update readme [ci skip]
1 parent 359c89e commit 6ba859d

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

README.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Check out [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) for addit
1515

1616
Use [instructions](https://openapi-generator.tech/docs/generators) provided for the Julia OpenAPI code generator plugin to generate Julia code.
1717

18+
> Note: It requires the Julia code generator hosted in [this forked branch](https://github.com/JuliaComputing/openapi-generator/tree/juliahub/juliacodegen) of the OpenAPI code generator. The plan is to submit it for inclusion in the upstream repo soon.
19+
1820
## Generated Code Structure
1921

2022
### Models
@@ -114,7 +116,10 @@ The second variant is suitable for asynchronous calls to methods that return chu
114116

115117
```julia
116118
# example asynchronous API that streams matching Pet instances into response_stream
117-
findPetsByStatus(api::PetApi, response_stream::Channel, status::Vector{String}) -> (response_stream, http_response)
119+
findPetsByStatus(
120+
api::PetApi,
121+
response_stream::Channel,
122+
status::Vector{String}) -> (response_stream, http_response)
118123
```
119124

120125
The HTTP response returned from the API calls, have these properties:
@@ -184,14 +189,25 @@ Optional parameters:
184189
- `optional_middlewares`: Register one or more optional middlewares to be applied to all requests.
185190

186191
Optional middlewares can be one or more of:
187-
- `init`: called before the request is processed
188-
- `pre_validation`: called after the request is parsed but before validation
189-
- `pre_invoke`: called after validation but before the handler is invoked
190-
- `post_invoke`: called after the handler is invoked but before the response is sent
192+
- `init`: called before the request is processed
193+
- `pre_validation`: called after the request is parsed but before validation
194+
- `pre_invoke`: called after validation but before the handler is invoked
195+
- `post_invoke`: called after the handler is invoked but before the response is sent
191196

192-
The order in which middlewares are invoked are:
197+
The order in which middlewares are invoked is:
193198
`init |> read |> pre_validation |> validate |> pre_invoke |> invoke |> post_invoke`
194199

200+
## Examples
201+
202+
The Petstore is a common example that most OpenAPI implementations use to test and demonstrate. Clients and servers generated from both version 2 and 3 specifications are included in this repo.
203+
204+
- Petstore v2:
205+
- Client: [docs](test/client/petstore_v2/petstore/README.md), [implementation](test/client/petstore_v2)
206+
- Server: [docs](test/server/petstore_v2/petstore/README.md), [implementation](test/server/petstore_v2)
207+
- Petstore v3:
208+
- Client: [docs](test/client/petstore_v3/petstore/README.md), [implementation](test/client/petstore_v3)
209+
- Server: [docs](test/server/petstore_v3/petstore/README.md), [implementation](test/server/petstore_v3)
210+
195211
## TODO
196212

197213
Not all OpenAPI features are supported yet, e.g.:
@@ -205,5 +221,3 @@ Not all OpenAPI features are supported yet, e.g.:
205221
- [`deepObject`](https://swagger.io/docs/specification/serialization/)s in query parameters
206222

207223
There could be more unsupported features than what is listed above.
208-
209-
This is currently a beta version. It requires the Julia code generator hosted in [this forked branch](https://github.com/JuliaComputing/openapi-generator/tree/juliahub/juliacodegen) of the OpenAPI code generator. The plan is to submit it for inclusion in the upstream repo soon.

0 commit comments

Comments
 (0)