Skip to content

Commit

Permalink
feature: test by specific branch
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinezAvellan committed Dec 3, 2024
1 parent 1986de2 commit a0f7af3
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 64 deletions.
21 changes: 3 additions & 18 deletions .github/workflows/update-swagger-on-git-page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,34 +45,24 @@ jobs:
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
echo "Running PWD: ===============================>"
pwd
echo "Running LS: ================================>"
ls
echo "Cloning midaz: =============================>"
gh repo clone LerianStudio/midaz
echo "Cloning Page: ==============================>"
gh repo clone LerianStudio/LerianStudio.github.io
echo "Running LS: ================================>"
ls
- name: Generate Swagger on Ledger and Transaction
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
cd midaz
git checkout feature/MIDAZ-350
echo "Running SET ENV: ================================>"
export PATH=$PATH:/usr/local/go/bin:$(go env GOPATH)/bin
echo "Installing Swaggo: ================================>"
go install github.com/swaggo/swag/cmd/swag@latest
echo "Swag installed at $(which swag): ================================>"
swag --version
echo "Go installed at $(which go): ================================>"
make tidy
make generate-docs-all
Expand All @@ -83,11 +73,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
echo "Running PWD: ================================>"
pwd
echo "Running LS: ================================>"
ls
cp midaz/components/ledger/api/swagger.json LerianStudio.github.io/ledger/
cp midaz/components/transaction/api/swagger.json LerianStudio.github.io/transaction/
Expand Down
2 changes: 1 addition & 1 deletion components/ledger/api/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2773,7 +2773,7 @@ const docTemplate = `{

// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "1.0",
Version: "1.0.0",
Host: "localhost:3000",
BasePath: "/",
Schemes: []string{},
Expand Down
2 changes: 1 addition & 1 deletion components/ledger/api/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "1.0"
"version": "1.0.0"
},
"host": "localhost:3000",
"basePath": "/",
Expand Down
2 changes: 1 addition & 1 deletion components/ledger/api/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ info:
url: http://www.apache.org/licenses/LICENSE-2.0.html
termsOfService: http://swagger.io/terms/
title: Midaz Ledger API
version: "1.0"
version: 1.0.0
paths:
/v1/organizations:
get:
Expand Down
21 changes: 6 additions & 15 deletions components/transaction/api/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -803,23 +803,14 @@ const docTemplate = `{
"Amount": {
"description": "Amount is the struct designed to represent the amount of an operation.",
"type": "object",
"required": [
"asset",
"value"
],
"properties": {
"asset": {
"type": "string",
"example": "BRL"
"amount": {
"type": "number",
"example": 1500
},
"scale": {
"type": "integer",
"minimum": 0,
"type": "number",
"example": 2
},
"value": {
"type": "integer",
"example": 1000
}
}
},
Expand Down Expand Up @@ -1164,7 +1155,7 @@ const docTemplate = `{
}
},
"Status": {
"description": "Status is the struct designed to represent the status of a transaction.",
"description": "Status is the struct designed to represent the status of an operation.",
"type": "object",
"properties": {
"code": {
Expand Down Expand Up @@ -1303,7 +1294,7 @@ const docTemplate = `{

// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "1.0",
Version: "1.0.0",
Host: "localhost:3002",
BasePath: "/",
Schemes: []string{},
Expand Down
21 changes: 6 additions & 15 deletions components/transaction/api/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "1.0"
"version": "1.0.0"
},
"host": "localhost:3002",
"basePath": "/",
Expand Down Expand Up @@ -797,23 +797,14 @@
"Amount": {
"description": "Amount is the struct designed to represent the amount of an operation.",
"type": "object",
"required": [
"asset",
"value"
],
"properties": {
"asset": {
"type": "string",
"example": "BRL"
"amount": {
"type": "number",
"example": 1500
},
"scale": {
"type": "integer",
"minimum": 0,
"type": "number",
"example": 2
},
"value": {
"type": "integer",
"example": 1000
}
}
},
Expand Down Expand Up @@ -1158,7 +1149,7 @@
}
},
"Status": {
"description": "Status is the struct designed to represent the status of a transaction.",
"description": "Status is the struct designed to represent the status of an operation.",
"type": "object",
"properties": {
"code": {
Expand Down
19 changes: 6 additions & 13 deletions components/transaction/api/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,12 @@ definitions:
Amount:
description: Amount is the struct designed to represent the amount of an operation.
properties:
asset:
example: BRL
type: string
amount:
example: 1500
type: number
scale:
example: 2
minimum: 0
type: integer
value:
example: 1000
type: integer
required:
- asset
- value
type: number
type: object
AssetRate:
description: AssetRate is a struct designed to store asset rate data.
Expand Down Expand Up @@ -269,7 +262,7 @@ definitions:
- from
type: object
Status:
description: Status is the struct designed to represent the status of a transaction.
description: Status is the struct designed to represent the status of an operation.
properties:
code:
example: ACTIVE
Expand Down Expand Up @@ -377,7 +370,7 @@ info:
url: http://www.apache.org/licenses/LICENSE-2.0.html
termsOfService: http://swagger.io/terms/
title: Midaz Transaction API
version: "1.0"
version: 1.0.0
paths:
/v1/organizations/{organization_id}/ledgers/{ledger_id}/accounts/{account_id}/operations:
get:
Expand Down

0 comments on commit a0f7af3

Please sign in to comment.