diff --git a/assets/create-template/templates/default/asyncapi.yaml b/assets/create-template/templates/default/asyncapi.yaml new file mode 100644 index 00000000000..5c35f499104 --- /dev/null +++ b/assets/create-template/templates/default/asyncapi.yaml @@ -0,0 +1,33 @@ +asyncapi: 2.6.0 + +info: + title: Temperature Service + version: 1.0.0 + description: This service is in charge of processing all the events related to temperature. + +servers: + dev: + url: test.mosquitto.org + protocol: mqtt + +channels: + temperature/changed: + description: Updates the bedroom temperature in the database when the temperatures drops or goes up. + publish: + operationId: temperatureChange + message: + description: Message that is being sent when the temperature in the bedroom changes. + payload: + type: object + additionalProperties: false + properties: + temperatureId: + type: string +components: + schemas: + temperatureId: + type: object + additionalProperties: false + properties: + temperatureId: + type: string \ No newline at end of file diff --git a/src/commands/new/template.ts b/src/commands/new/template.ts index 1745539d27a..e8e32a27b79 100644 --- a/src/commands/new/template.ts +++ b/src/commands/new/template.ts @@ -81,7 +81,7 @@ export default class template extends Command { `Unable to create the project. Please check the following message for further info about the error:\n\n${err}` ); } - this.specFile = await load(`${templateDirectory}/asyncapi.yml`); + this.specFile = await load(`${templateDirectory}/asyncapi.yaml`); this.metricsMetadata.template = flags.template; } } diff --git a/test/integration/new/template.test.ts b/test/integration/new/template.test.ts index cff06301202..88e74380135 100644 --- a/test/integration/new/template.test.ts +++ b/test/integration/new/template.test.ts @@ -10,7 +10,7 @@ const errorMessages = { alreadyExists: (projectName: string) => 'Unable to create the project', }; -describe('new glee', () => { +describe('new template', () => { before(() => { try { testHelper.deleteDummyProjectDirectory();