Skip to content

Commit

Permalink
Pattern flag and fixing api-gateway pattern sample (#91)
Browse files Browse the repository at this point in the history
* Fix spectral rules

* Rename --source to --pattern

* Rename type to node-type in api-gateway.json
  • Loading branch information
willosborne authored Apr 2, 2024
1 parent b5c4671 commit ba39ab4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions calm/pattern/api-gateway.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"description": {
"const": "The API Gateway used to verify authorization and access to downstream system"
},
"type": {
"node-type": {
"const": "system"
},
"name": {
Expand All @@ -45,7 +45,7 @@
"description": {
"const": "The API Consumer making an authenticated and authorized request"
},
"type": {
"node-type": {
"const": "system"
},
"name": {
Expand All @@ -68,7 +68,7 @@
"description": {
"const": "The API Producer serving content"
},
"type": {
"node-type": {
"const": "system"
},
"name": {
Expand All @@ -89,7 +89,7 @@
"description": {
"const": "The Identity Provider used to verify the bearer token"
},
"type": {
"node-type": {
"const": "system"
},
"name": {
Expand Down
4 changes: 2 additions & 2 deletions cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ program
program
.command('generate')
.description('Generate an instantiation from a CALM pattern file.')
.requiredOption('-s, --source <source>', 'Path to the pattern file to use. May be a file path or a URL.')
.requiredOption('-p, --pattern <source>', 'Path to the pattern file to use. May be a file path or a URL.')
.requiredOption('-o, --output <output>', 'Path location at which to output the generated file.')
.option('-v, --verbose', 'Enable verbose logging.')
.action((options) => {
runGenerate(options.source, options.output, !!options.verbose);
runGenerate(options.pattern, options.output, !!options.verbose);
});

program.parse(process.argv);

0 comments on commit ba39ab4

Please sign in to comment.