Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ljacobsson committed Jan 15, 2021
1 parent 260627e commit bd70ded
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# schemas-cli

CLI took that lets you import OpenAPI definitions into Amazon EventBridge Schema registry. these schemas can then be used to generate code binding in a [variety of languages](https://github.com/quicktype/quicktype#target-languages)
CLI took that lets you import OpenAPI definitions into Amazon EventBridge Schema registry. These schemas can then be used to generate code bindings in a [variety of languages](https://github.com/quicktype/quicktype#target-languages)

This is still in beta.

Expand Down
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mhlabs/schemas-cli",
"version": "0.0.3",
"version": "0.0.4",
"description": "CLI to manage schemas in EventBridge Schema Registry",
"main": "index.js",
"scripts": {
Expand All @@ -27,10 +27,15 @@
"bin": {
"schemas": "index.js"
},
"publishConfig": {
"access": "public"
},
"keywords": [
"aws",
"serverless",
"eventbridge",
"schemas",
"openapi",
"productivity"
]
}
3 changes: 0 additions & 3 deletions src/commands/code-bindings/code-bindings.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ async function create(cmd) {
const path = await getPath(schema);
const method = await getMethod(schema, path);
const direction = await getDirection(schema, path, method);
console.log(direction);
if (direction === "responses") {
const status = await getStatusCode(schema, path, method);
const responses = schema.paths[path][method].responses[status];
Expand All @@ -69,7 +68,6 @@ async function create(cmd) {
: content.schema.$ref;
outputSchemaName = ref.split("/").slice(-1)[0];
} else {
console.log(JSON.stringify(schema.paths[path][method], null, 2));
const ref =
schema.paths[path][method].requestBody.content[applicationJson].schema
.$ref;
Expand Down Expand Up @@ -203,7 +201,6 @@ async function generateType(typeName, schema, cmd) {
);
}
}
console.log(JSON.stringify(jsonSchema, null, 2));
const schemaInput = new JSONSchemaInput(new JSONSchemaStore());
await schemaInput.addSource({
name: typeName,
Expand Down

0 comments on commit bd70ded

Please sign in to comment.