Skip to content

Commit e49a142

Browse files
committed
update tests with latest codegen
1 parent f4c7b1c commit e49a142

File tree

30 files changed

+1582
-56
lines changed

30 files changed

+1582
-56
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.2.1-SNAPSHOT
1+
6.3.0-SNAPSHOT

test/client/petstore_v2/petstore/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ Documentation is also embedded in Julia which can be used with a Julia specific
1818

1919
## Documentation for API Endpoints
2020

21-
All URIs are relative to *https://petstore.swagger.io/v2*
22-
2321
Class | Method | HTTP request | Description
2422
------------ | ------------- | ------------- | -------------
2523
*PetApi* | [**add_pet**](docs/PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.2.1-SNAPSHOT
1+
6.3.0-SNAPSHOT

test/client/petstore_v3/petstore/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ Documentation is also embedded in Julia which can be used with a Julia specific
1818

1919
## Documentation for API Endpoints
2020

21-
All URIs are relative to */v3*
22-
2321
Class | Method | HTTP request | Description
2422
------------ | ------------- | ------------- | -------------
2523
*PetApi* | [**add_pet**](docs/PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store

test/server/petstore_v2/petstore/.openapi-generator/FILES

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
.openapi-generator-ignore
22
README.md
3+
docs/ApiResponse.md
4+
docs/Category.md
5+
docs/Order.md
6+
docs/Pet.md
7+
docs/PetApi.md
8+
docs/StoreApi.md
9+
docs/Tag.md
10+
docs/User.md
11+
docs/UserApi.md
312
src/PetStoreServer.jl
413
src/apis/api_PetApi.jl
514
src/apis/api_StoreApi.jl
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.2.1-SNAPSHOT
1+
6.3.0-SNAPSHOT

test/server/petstore_v2/petstore/README.md

Lines changed: 64 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,69 @@ This API server was generated by the [OpenAPI Generator](https://openapi-generat
1313
Place the Julia files generated under the `src` folder in your Julia project. Include PetStoreServer.jl in the project code.
1414
It would include the module named PetStoreServer.
1515

16-
Implement the server methods. The expected methods are documented with the PetStoreServer module.
17-
Launch a HTTP server with a router that has all handlers registered. E.g.:
16+
Implement the server methods as listed below. They are also documented with the PetStoreServer module.
17+
Launch a HTTP server with a router that has all handlers registered. A `register` method is provided in PetStoreServer module for convenience.
1818

19+
```julia
20+
register(
21+
router::HTTP.Router, # Router to register handlers in
22+
impl; # Module that implements the server methods
23+
path_prefix::String="", # Prefix to be applied to all paths
24+
optional_middlewares... # Optional middlewares to be applied to all handlers
25+
)
1926
```
20-
router = PetStoreServer.register(HTTP.Router(), @__MODULE__)
21-
HTTP.serve(router, 8080) # start server on port 8080
22-
```
27+
28+
Optional middlewares can be one or more of:
29+
- `init`: called before the request is processed
30+
- `pre_validation`: called after the request is parsed but before validation
31+
- `pre_invoke`: called after validation but before the handler is invoked
32+
- `post_invoke`: called after the handler is invoked but before the response is sent
33+
34+
The order in which middlewares are invoked are:
35+
`init |> read |> pre_validation |> validate |> pre_invoke |> invoke |> post_invoke`
36+
37+
38+
## Documentation for API Endpoints
39+
40+
The following server methods must be implemented:
41+
42+
Class | Method | HTTP request | Description
43+
------------ | ------------- | ------------- | -------------
44+
*PetApi* | [**add_pet**](docs/PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store
45+
*PetApi* | [**delete_pet**](docs/PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet
46+
*PetApi* | [**find_pets_by_status**](docs/PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status
47+
*PetApi* | [**find_pets_by_tags**](docs/PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags
48+
*PetApi* | [**get_pet_by_id**](docs/PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID
49+
*PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet
50+
*PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data
51+
*PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image
52+
*StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
53+
*StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status
54+
*StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{orderId} | Find purchase order by ID
55+
*StoreApi* | [**place_order**](docs/StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet
56+
*UserApi* | [**create_user**](docs/UserApi.md#create_user) | **POST** /user | Create user
57+
*UserApi* | [**create_users_with_array_input**](docs/UserApi.md#create_users_with_array_input) | **POST** /user/createWithArray | Creates list of users with given input array
58+
*UserApi* | [**create_users_with_list_input**](docs/UserApi.md#create_users_with_list_input) | **POST** /user/createWithList | Creates list of users with given input array
59+
*UserApi* | [**delete_user**](docs/UserApi.md#delete_user) | **DELETE** /user/{username} | Delete user
60+
*UserApi* | [**get_user_by_name**](docs/UserApi.md#get_user_by_name) | **GET** /user/{username} | Get user by user name
61+
*UserApi* | [**login_user**](docs/UserApi.md#login_user) | **GET** /user/login | Logs user into the system
62+
*UserApi* | [**logout_user**](docs/UserApi.md#logout_user) | **GET** /user/logout | Logs out current logged in user session
63+
*UserApi* | [**update_user**](docs/UserApi.md#update_user) | **PUT** /user/{username} | Updated user
64+
65+
66+
67+
## Documentation For Models
68+
69+
- [ApiResponse](docs/ApiResponse.md)
70+
- [Category](docs/Category.md)
71+
- [Order](docs/Order.md)
72+
- [Pet](docs/Pet.md)
73+
- [Tag](docs/Tag.md)
74+
- [User](docs/User.md)
75+
76+
77+
78+
## Author
79+
80+
81+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# ApiResponse
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**code** | **Int64** | | [optional] [default to nothing]
7+
**type** | **String** | | [optional] [default to nothing]
8+
**message** | **String** | | [optional] [default to nothing]
9+
10+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11+
12+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Category
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**id** | **Int64** | | [optional] [default to nothing]
7+
**name** | **String** | | [optional] [default to nothing]
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Order
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**id** | **Int64** | | [optional] [default to nothing]
7+
**petId** | **Int64** | | [optional] [default to nothing]
8+
**quantity** | **Int64** | | [optional] [default to nothing]
9+
**shipDate** | **ZonedDateTime** | | [optional] [default to nothing]
10+
**status** | **String** | Order Status | [optional] [default to nothing]
11+
**complete** | **Bool** | | [optional] [default to nothing]
12+
13+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
14+
15+

0 commit comments

Comments
 (0)