Skip to content

Commit

Permalink
Merge pull request #121 from webitel/custom_swagger
Browse files Browse the repository at this point in the history
added custom.swagger.json
  • Loading branch information
navrotskyj authored Jan 24, 2025
2 parents 3efc3de + 5f20c96 commit 8bd284e
Show file tree
Hide file tree
Showing 5 changed files with 4,018 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/logger-swagger-generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Run compiler
run: protoc -I./annotations -I./general/general.proto -I./logger -I. --swagger_out=version=false,json_names_for_fields=false,allow_delete_body=true,include_package_in_tags=false,allow_repeated_fields_in_body=false,fqn_for_swagger_name=false,merge_file_name=logger,allow_merge=true:./swagger ./logger/*.proto
- name: Run swagger-mix
run: go run github.com/msample/swagger-mixin@latest swagger/engine.swagger.json swagger/storage.swagger.json swagger/messages.swagger.json swagger/logger.swagger.json swagger/contacts.swagger.json swagger/webitel-go.swagger.json swagger/wfm.swagger.json swagger/knowledgebase.swagger.json swagger/cases.swagger.json > swagger/api.json
run: go run github.com/msample/swagger-mixin@latest swagger/engine.swagger.json swagger/storage.swagger.json swagger/messages.swagger.json swagger/logger.swagger.json swagger/contacts.swagger.json swagger/webitel-go.swagger.json swagger/wfm.swagger.json swagger/knowledgebase.swagger.json swagger/cases.swagger.json swagger/custom.swagger.json > swagger/api.json
- name: Push changes
if: always()
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/swagger-mix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/checkout@v4
- name: Run generator
run:
go run github.com/msample/swagger-mixin@latest swagger/engine.swagger.json swagger/storage.swagger.json swagger/messages.swagger.json swagger/logger.swagger.json swagger/contacts.swagger.json swagger/webitel-go.swagger.json swagger/wfm.swagger.json swagger/knowledgebase.swagger.json swagger/cases.swagger.json > swagger/api.json
go run github.com/msample/swagger-mixin@latest swagger/engine.swagger.json swagger/storage.swagger.json swagger/messages.swagger.json swagger/logger.swagger.json swagger/contacts.swagger.json swagger/webitel-go.swagger.json swagger/wfm.swagger.json swagger/knowledgebase.swagger.json swagger/cases.swagger.json swagger/custom.swagger.json > swagger/api.json
- name: Git add changes
if: always()
run:
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ all: engine_swagger engine_proto fs storage_swagger storage_proto logger_swagger
.PHONY: engine_swagger

engine_swagger:
protoc -I/usr/local/include -I./engine -I./ \
protoc -I/usr/local/include -I./engine -I./ -I./annotations \
--swagger_out=version=false,json_names_for_fields=false,allow_delete_body=true,include_package_in_tags=false,allow_repeated_fields_in_body=false,fqn_for_swagger_name=false,merge_file_name=engine,allow_merge=true:./swagger \
./engine/*.proto

Expand Down Expand Up @@ -47,7 +47,7 @@ fs:
.PHONY: storage_swagger

storage_swagger:
protoc -I/usr/local/include -I./storage \
protoc -I/usr/local/include -I./storage -I./annotations \
-I. \
--swagger_out=version=false,json_names_for_fields=false,allow_delete_body=true,include_package_in_tags=false,allow_repeated_fields_in_body=false,fqn_for_swagger_name=false,merge_file_name=storage,allow_merge=true:./swagger \
./storage/*.proto
Expand Down Expand Up @@ -144,7 +144,8 @@ contacts_proto:

swagger_mix:
go run github.com/msample/swagger-mixin@latest ./swagger/engine.swagger.json ./swagger/storage.swagger.json \
./swagger/messages.swagger.json ./swagger/logger.swagger.json ./swagger/contacts.swagger.json ./swagger/webitel-go.swagger.json ./swagger/wfm.swagger.json ./swagger/knowledgebase.swagger.json ./swagger/cases.swagger.json > ./swagger/api.json | true
./swagger/messages.swagger.json ./swagger/logger.swagger.json ./swagger/contacts.swagger.json ./swagger/webitel-go.swagger.json \
./swagger/wfm.swagger.json ./swagger/knowledgebase.swagger.json ./swagger/cases.swagger.json ./swagger/custom.swagger.json > ./swagger/api.json | true


.PHONY: clean
Expand Down
Loading

0 comments on commit 8bd284e

Please sign in to comment.