From bbcb04bde15a4c24e85a71be0fdb5aac0d1ba1e5 Mon Sep 17 00:00:00 2001 From: Igor Polyakov Date: Tue, 18 Jun 2024 17:37:51 +0300 Subject: [PATCH] rename swagger -> openapi --- Makefile | 2 +- README.md | 12 ++++++------ api/{swagger.yaml => openapi.yaml} | 0 3 files changed, 7 insertions(+), 7 deletions(-) rename api/{swagger.yaml => openapi.yaml} (100%) diff --git a/Makefile b/Makefile index e90ead3..cb8fd12 100644 --- a/Makefile +++ b/Makefile @@ -79,4 +79,4 @@ attach-db: # Generate Go server boilerplate from OpenAPI 3 codegen: - oapi-codegen -generate models,chi -o internal/app/server/server.gen.go --package server api/swagger.yaml + oapi-codegen -generate models,chi -o internal/app/server/server.gen.go --package server api/openapi.yaml diff --git a/README.md b/README.md index 010dd9f..e5d739d 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Roadmap [here](TODO.md) ```sh . ├── api # http openapi schema -│   └── swagger.yaml +│   └── openapi.yaml ├── cmd # main app │   └── ctf01d │   └── main.go @@ -82,10 +82,10 @@ $ go run cmd/ctf01d/main.go will be available on - [http://localhost:4102](http://localhost:4102) -### Generate code from swagger schema +### Generate code from openapi schema ```shell - oapi-codegen -generate models,chi -o internal/app/server/server.gen.go --package routers api/swagger.yaml + oapi-codegen -generate models,chi -o internal/app/server/server.gen.go --package routers api/openapi.yaml ``` ## DataBase @@ -119,9 +119,9 @@ $ docker exec -it ctf01d-postgres psql -U postgres ### fuzz api ```shell -docker run --net=host --volume /home/user/ctf01d-training-platform/api:/api/ ghcr.io/matusf/openapi-fuzzer run -s '/api/swagger.yaml' --url http://localhost:4102 +docker run --net=host --volume /home/user/ctf01d-training-platform/api:/api/ ghcr.io/matusf/openapi-fuzzer run -s '/api/openapi.yaml' --url http://localhost:4102 -docker run --net=host --volume /home/user/ctf01d-training-platform/api:/api/ kisspeter/apifuzzer --src_file '/api/swagger.yaml' --url http://localhost:4102 -r /api/ +docker run --net=host --volume /home/user/ctf01d-training-platform/api:/api/ kisspeter/apifuzzer --src_file '/api/openapi.yaml' --url http://localhost:4102 -r /api/ ``` @@ -132,4 +132,4 @@ install: ``` $ go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@latest $ export PATH="$PATH:$HOME/bin:$HOME/go/bin" -``` \ No newline at end of file +``` diff --git a/api/swagger.yaml b/api/openapi.yaml similarity index 100% rename from api/swagger.yaml rename to api/openapi.yaml