-
Notifications
You must be signed in to change notification settings - Fork 30
/
Makefile
50 lines (32 loc) · 1.58 KB
/
Makefile
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
SHELL := /bin/bash
CHANGES_PENDING := `git status --porcelain -- ':(exclude)*gen.properties' | grep -c ^ || true`
build: install_deps generate lint cleanup
install_deps: codegen_install
lint: validate_raml validate_oas
generate: generate_oas generate_plantuml
validate_oas:
npx autorest --v3 --azure-validator --input-file=oas/api/openapi.yaml
npx autorest --v3 --azure-validator --input-file=oas/history/openapi.yaml
npx autorest --v3 --azure-validator --input-file=oas/import/openapi.yaml
codegen_install:
curl -o- -s https://raw.githubusercontent.com/vrapio/rmf-codegen/master/scripts/install.sh | bash
validate_raml: codegen_install
rmf-codegen verify api-specs/api/api.raml
generate_oas: generate_oas_api generate_oas_import generate_oas_history
generate_oas_api: codegen_install
rmf-codegen generate -o oas/api -t OAS api-specs/api/api.raml
generate_oas_import: codegen_install
rmf-codegen generate -o oas/import -t OAS api-specs/import/api.raml
generate_oas_history: codegen_install
rmf-codegen generate -o oas/history -t OAS api-specs/history/api.raml
generate_bruno: generate_bruno_api generate_bruno_import generate_bruno_history
generate_bruno_api: codegen_install
rmf-codegen generate -o bruno/api -t BRUNO api-specs/api/api.raml
generate_bruno_import: codegen_install
rmf-codegen generate -o bruno/import -t BRUNO api-specs/import/api.raml
generate_bruno_history: codegen_install
rmf-codegen generate -o bruno/history -t BRUNO api-specs/history/api.raml
generate_plantuml: codegen_install
rmf-codegen generate -o uml/api -t PLANTUML api-specs/api/api.raml
cleanup:
rm -rf tmpdoc