File: generate-swagger-api.sh

package info (click to toggle)
docker.io 27.5.1%2Bdfsg4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 67,384 kB
  • sloc: sh: 5,847; makefile: 1,146; ansic: 664; python: 162; asm: 133
file content (51 lines) | stat: -rwxr-xr-x 1,524 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/sh
set -eu

swagger generate model -f api/swagger.yaml \
	-t api -m types --skip-validator -C api/swagger-gen.yaml \
	-n ErrorResponse \
	-n GraphDriverData \
	-n IdResponse \
	-n Plugin \
	-n PluginDevice \
	-n PluginMount \
	-n PluginEnv \
	-n PluginInterfaceType \
	-n Port

swagger generate model -f api/swagger.yaml \
	-t api -m types/container --skip-validator -C api/swagger-gen.yaml \
	-n ContainerCreateResponse \
	-n ContainerWaitResponse \
	-n ContainerWaitExitError \
	-n ChangeType \
	-n FilesystemChange

swagger generate model -f api/swagger.yaml \
	-t api -m types/image --skip-validator -C api/swagger-gen.yaml \
	-n ImageDeleteResponseItem
#-n ImageSummary TODO: Restore when go-swagger is updated
# See https://github.com/moby/moby/pull/47526#discussion_r1551800022

swagger generate model -f api/swagger.yaml \
	-t api -m types/network --skip-validator -C api/swagger-gen.yaml \
	-n NetworkCreateResponse

swagger generate model -f api/swagger.yaml \
	-t api -m types/volume --skip-validator -C api/swagger-gen.yaml \
	-n Volume \
	-n VolumeCreateOptions \
	-n VolumeListResponse

swagger generate operation -f api/swagger.yaml \
	-t api -a types -m types -C api/swagger-gen.yaml \
	-T api/templates --skip-responses --skip-parameters --skip-validator \
	-n Authenticate \
	-n ContainerTop \
	-n ContainerUpdate \
	-n ImageHistory

swagger generate model -f api/swagger.yaml \
	-t api -m types/swarm --skip-validator -C api/swagger-gen.yaml \
	-n ServiceCreateResponse \
	-n ServiceUpdateResponse