Skip to content

Commit

Permalink
Increasing AsyncAPI version to 2.6.0. (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinTail authored Mar 26, 2024
1 parent 61c7360 commit 092f847
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion example/example-documentation.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
asyncapi: 2.5.0
asyncapi: 2.6.0
info:
title: Example APP
version: 0.11.1
Expand Down
36 changes: 18 additions & 18 deletions src/__snapshots__/documentation.spec.ts.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Documentation > Basic cases > should generate the correct schema for complex types 1`] = `
"asyncapi: 2.5.0
"asyncapi: 2.6.0
info:
title: Testing Complex Types
version: 3.4.5
Expand Down Expand Up @@ -115,7 +115,7 @@ components: {}
`;

exports[`Documentation > Basic cases > should generate the correct schema for discriminated union type 1`] = `
"asyncapi: 2.5.0
"asyncapi: 2.6.0
info:
title: Testing Discriminated Union Type
version: 3.4.5
Expand Down Expand Up @@ -258,7 +258,7 @@ components: {}
`;

exports[`Documentation > Basic cases > should generate the correct schema for intersection type 1`] = `
"asyncapi: 2.5.0
"asyncapi: 2.6.0
info:
title: Testing Intersection and And types
version: 3.4.5
Expand Down Expand Up @@ -368,7 +368,7 @@ components: {}
`;

exports[`Documentation > Basic cases > should generate the correct schema for nullable and optional types 1`] = `
"asyncapi: 2.5.0
"asyncapi: 2.6.0
info:
title: Testing Nullable and Optional Types
version: 3.4.5
Expand Down Expand Up @@ -479,7 +479,7 @@ components: {}
`;

exports[`Documentation > Basic cases > should generate the correct schema for union type 1`] = `
"asyncapi: 2.5.0
"asyncapi: 2.6.0
info:
title: Testing Union and Or Types
version: 3.4.5
Expand Down Expand Up @@ -599,7 +599,7 @@ components: {}
`;

exports[`Documentation > Basic cases > should generate the correct schema of the example 1`] = `
"asyncapi: 2.5.0
"asyncapi: 2.6.0
info:
title: Example API
version: 1.2.3
Expand Down Expand Up @@ -773,7 +773,7 @@ components: {}
`;

exports[`Documentation > Basic cases > should handle bigint, boolean, date, null and readonly 1`] = `
"asyncapi: 2.5.0
"asyncapi: 2.6.0
info:
title: Testing additional types
version: 3.4.5
Expand Down Expand Up @@ -880,7 +880,7 @@ components: {}
`;

exports[`Documentation > Basic cases > should handle different number types 1`] = `
"asyncapi: 2.5.0
"asyncapi: 2.6.0
info:
title: Testing numbers
version: 3.4.5
Expand Down Expand Up @@ -1023,7 +1023,7 @@ components: {}
`;

exports[`Documentation > Basic cases > should handle different string types 1`] = `
"asyncapi: 2.5.0
"asyncapi: 2.6.0
info:
title: Testing strings
version: 3.4.5
Expand Down Expand Up @@ -1171,7 +1171,7 @@ components: {}
`;

exports[`Documentation > Basic cases > should handle enum types 1`] = `
"asyncapi: 2.5.0
"asyncapi: 2.6.0
info:
title: Testing enums
version: 3.4.5
Expand Down Expand Up @@ -1268,7 +1268,7 @@ components: {}
`;

exports[`Documentation > Basic cases > should handle record 1`] = `
"asyncapi: 2.5.0
"asyncapi: 2.6.0
info:
title: Testing record
version: 3.4.5
Expand Down Expand Up @@ -1401,7 +1401,7 @@ components: {}
`;

exports[`Documentation > Basic cases > should handle transformation schema in output 1`] = `
"asyncapi: 2.5.0
"asyncapi: 2.6.0
info:
title: Testing Transformation in response schema
version: 3.4.5
Expand Down Expand Up @@ -1503,7 +1503,7 @@ components: {}
`;

exports[`Documentation > Basic cases > should handle tuples 0 1`] = `
"asyncapi: 2.5.0
"asyncapi: 2.6.0
info:
title: Testing tuples
version: 3.4.5
Expand Down Expand Up @@ -1591,7 +1591,7 @@ components: {}
`;

exports[`Documentation > Basic cases > should handle tuples 1 1`] = `
"asyncapi: 2.5.0
"asyncapi: 2.6.0
info:
title: Testing tuples
version: 3.4.5
Expand Down Expand Up @@ -1684,7 +1684,7 @@ components: {}
`;

exports[`Documentation > Basic cases > should handle tuples 2 1`] = `
"asyncapi: 2.5.0
"asyncapi: 2.6.0
info:
title: Testing tuples
version: 3.4.5
Expand Down Expand Up @@ -1781,7 +1781,7 @@ components: {}
`;

exports[`Documentation > Basic cases > should handle tuples 3 1`] = `
"asyncapi: 2.5.0
"asyncapi: 2.6.0
info:
title: Testing tuples
version: 3.4.5
Expand Down Expand Up @@ -1866,7 +1866,7 @@ components: {}
`;

exports[`Documentation > Basic cases > should handle type any 1`] = `
"asyncapi: 2.5.0
"asyncapi: 2.6.0
info:
title: Testing type any
version: 3.4.5
Expand Down Expand Up @@ -1957,7 +1957,7 @@ components: {}
`;

exports[`Documentation > Basic cases > should handle z.preprocess() 1`] = `
"asyncapi: 2.5.0
"asyncapi: 2.6.0
info:
title: Testing z.preprocess()
version: 3.4.5
Expand Down
6 changes: 3 additions & 3 deletions src/async-api/__snapshots__/document-builder.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`AsyncApiDocumentBuilder > getSpec() > should return the document 1`] = `
{
"asyncapi": "2.5.0",
"asyncapi": "2.6.0",
"channels": {},
"components": {},
"info": {
Expand All @@ -14,10 +14,10 @@ exports[`AsyncApiDocumentBuilder > getSpec() > should return the document 1`] =
}
`;

exports[`AsyncApiDocumentBuilder > getSpecAsJson() > should return the document 1`] = `"{"asyncapi":"2.5.0","info":{"title":"test","version":"1.0.0"},"tags":[],"servers":{},"channels":{},"components":{}}"`;
exports[`AsyncApiDocumentBuilder > getSpecAsJson() > should return the document 1`] = `"{"asyncapi":"2.6.0","info":{"title":"test","version":"1.0.0"},"tags":[],"servers":{},"channels":{},"components":{}}"`;

exports[`AsyncApiDocumentBuilder > getSpecAsYaml() > should return the document 1`] = `
"asyncapi: 2.5.0
"asyncapi: 2.6.0
info:
title: test
version: 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion src/async-api/document-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class AsyncApiDocumentBuilder {
initial: Pick<AsyncApiDocument, "info" | "id" | "defaultContentType">,
) {
this.document = {
asyncapi: "2.5.0",
asyncapi: "2.6.0",
...initial,
tags: [],
servers: {},
Expand Down

0 comments on commit 092f847

Please sign in to comment.