Skip to content

Commit fdc7110

Browse files
committed
Initial Mill support
1 parent 32aa36d commit fdc7110

16 files changed

Lines changed: 2906 additions & 0 deletions

File tree

modules/openapi-generator-mill-plugin/README.md

Lines changed: 177 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
To test the Mill plugin, this project can be used.
2+
3+
> ![Note]
4+
> The `mill-build` folder is only needed to look up the plugin from the local Maven repository for development purposes.
5+
6+
It requires that the current SNAPSHOT version of the plugin is installed in the local Maven repository.
7+
Replace the version in `build.mill` or set the environment variable `$MILL_OPENAPITOOLS_PLUGIN_VERSION` to the desired version.
8+
9+
Run `./mill __.compile` to test if the plugin works or some of the modules tasks like `./mill openapi.validate`.
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
openapi: "3.0.0"
2+
servers:
3+
- url: http://petstore.swagger.io/v1
4+
paths:
5+
/pets:
6+
get:
7+
summary: List all pets
8+
operationId: listPets
9+
tags:
10+
- pets
11+
parameters:
12+
- name: limit
13+
in: query
14+
description: How many items to return at one time (max 100)
15+
required: false
16+
schema:
17+
type: integer
18+
format: int32
19+
responses:
20+
'200':
21+
description: A paged array of pets
22+
headers:
23+
x-next:
24+
description: A link to the next page of responses
25+
schema:
26+
type: string
27+
content:
28+
application/json:
29+
schema:
30+
$ref: "#/components/schemas/Pets"
31+
default:
32+
description: unexpected error
33+
content:
34+
application/json:
35+
schema:
36+
$ref: "#/components/schemas/Error"
37+
post:
38+
summary: Create a pet
39+
tags:
40+
- pets
41+
responses:
42+
'201':
43+
description: Null response
44+
default:
45+
description: unexpected error
46+
content:
47+
application/json:
48+
schema:
49+
$ref: "#/components/schemas/Error"
50+
/pets/{petId}:
51+
get:
52+
summary: Info for a specific pet
53+
operationId: showPetById
54+
tags:
55+
- pets
56+
parameters:
57+
- name: petId
58+
in: path
59+
required: true
60+
description: The id of the pet to retrieve
61+
schema:
62+
type: string
63+
responses:
64+
'200':
65+
description: Expected response to a valid request
66+
content:
67+
application/json:
68+
schema:
69+
$ref: "#/components/schemas/Pets"
70+
default:
71+
description: unexpected error
72+
content:
73+
application/json:
74+
schema:
75+
$ref: "#/components/schemas/Error"
76+
components:
77+
schemas:
78+
Pet:
79+
required:
80+
- id
81+
- name
82+
properties:
83+
id:
84+
type: integer
85+
format: int64
86+
name:
87+
type: string
88+
tag:
89+
type: string
90+
Pets:
91+
type: array
92+
items:
93+
$ref: "#/components/schemas/Pet"
94+
Error:
95+
required:
96+
- code
97+
- message
98+
properties:
99+
code:
100+
type: integer
101+
format: int32
102+
message:
103+
type: string

0 commit comments

Comments
 (0)