Skip to content

Commit

Permalink
Instance api (#529)
Browse files Browse the repository at this point in the history
* fix: downgrade nanoid

* fix: mock for kafka instance api
  • Loading branch information
wtrocki authored Sep 9, 2022
1 parent 25420d0 commit 8b8adb0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions apicurio-cli
Submodule apicurio-cli added at 663390
5 changes: 3 additions & 2 deletions packages/api-mock/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
},
"license": "Apache-2.0",
"scripts": {
"build": "cp -Rf ../../.openapi ./openapi && json2yaml ./openapi/srs-fleet-manager.json > ./openapi/srs-fleet-manager.yaml",
"build": "cp -Rf ../../.openapi ./openapi && ./scripts/transform.sh ",
"start": "node ./src/index.js",
"start-preseed": "node ./src/index.js --pre-seed",
"api:kafka-management": "openapi-editor --file openapi/kas-fleet-manager.yaml --port 10000",
"api:kafka-instance": "openapi-editor --file openapi/kafka-admin-rest.yaml --port 10001",
"api:registry-management": "openapi-editor --file openapi/srs-fleet-manager.yaml --port 10003",
"api:registry-instance": "openapi-editor --file openapi/registry-instance-rest.yml --port 10004",
"api:registry-instance": "openapi-editor --file openapi/registry-instance.yaml --port 10004",
"packageRelease": "npm publish"
},
"dependencies": {
Expand All @@ -36,6 +36,7 @@
"axios": "0.27.2",
"json2yaml": "1.1.0",
"openapi-editor": "0.3.0",
"replace": "^1.2.1",
"wait-on": "6.0.1"
}
}
3 changes: 3 additions & 0 deletions packages/api-mock/scripts/transform.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
json2yaml ./openapi/srs-fleet-manager.json > ./openapi/srs-fleet-manager.yaml
json2yaml ./openapi/registry-instance.json > ./openapi/registry-instance.yaml
replace "\*\/\*" "text\/plain" ./openapi/registry-instance.yaml
2 changes: 1 addition & 1 deletion packages/api-mock/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const topicAPI = new OpenAPIBackend({
});

const srsDataApi = new OpenAPIBackend({
definition: path.join(__dirname, "../openapi/registry-instance-rest.yaml"),
definition: path.join(__dirname, "../openapi/registry-instance.yaml"),
validate: false
});

Expand Down

0 comments on commit 8b8adb0

Please sign in to comment.