Skip to content

Commit

Permalink
update parser and fix broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aayushmau5 committed Sep 4, 2023
1 parent f54e1db commit 1b9b99d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 56 deletions.
14 changes: 0 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 4 additions & 12 deletions test/fixtures/asyncapidiff.fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,8 @@ export const MarkdownJSONSubtypeChanges = `## Breaking
"type": "object",
"x-parser-schema-id": "<anonymous-schema-1>"
},
"schemaFormat": "application/vnd.aai.asyncapi;version=2.0.0",
"x-parser-message-name": "channelMessage",
"x-parser-message-parsed": true,
"x-parser-original-traits": [
"traits": [
{
"headers": {
"properties": {
Expand Down Expand Up @@ -173,10 +171,8 @@ export const MarkdownJSONSubtypeChanges = `## Breaking
"type": "object",
"x-parser-schema-id": "<anonymous-schema-1>"
},
"schemaFormat": "application/vnd.aai.asyncapi;version=2.0.0",
"x-parser-message-name": "channelMessage",
"x-parser-message-parsed": true,
"x-parser-original-traits": [
"traits": [
{
"headers": {
"properties": {
Expand Down Expand Up @@ -219,10 +215,8 @@ export const MarkdownYAMLSubtypeChanges = `## Breaking
x-parser-schema-id: <anonymous-schema-2>
type: object
x-parser-schema-id: <anonymous-schema-1>
schemaFormat: application/vnd.aai.asyncapi;version=2.0.0
x-parser-message-name: channelMessage
x-parser-message-parsed: true
x-parser-original-traits:
traits:
- headers:
properties:
some-common-header:
Expand Down Expand Up @@ -261,10 +255,8 @@ export const MarkdownYAMLSubtypeChanges = `## Breaking
x-parser-schema-id: <anonymous-schema-2>
type: object
x-parser-schema-id: <anonymous-schema-1>
schemaFormat: application/vnd.aai.asyncapi;version=2.0.0
x-parser-message-name: channelMessage
x-parser-message-parsed: true
x-parser-original-traits:
traits:
- headers:
properties:
some-common-header:
Expand Down
20 changes: 8 additions & 12 deletions test/fixtures/diff.fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,22 @@ export const diffOutput = [
type: 'object',
'x-parser-schema-id': '<anonymous-schema-1>',
},
schemaFormat: 'application/vnd.aai.asyncapi;version=2.0.0',
'x-parser-message-name': 'channelMessage',
'x-parser-message-parsed': true,
'x-parser-original-traits': [
traits: [
{
headers: {
properties: {
'some-common-header': {
type: 'string',
'x-parser-schema-id': '<anonymous-schema-7>'
'x-parser-schema-id': '<anonymous-schema-7>',
},
},
type: 'object',
'x-parser-schema-id': '<anonymous-schema-6>'
'x-parser-schema-id': '<anonymous-schema-6>',
},
'x-some-extension': 'some extension',
},
],
'x-parser-message-name': 'channelMessage',
'x-some-extension': 'some extension',
},
},
Expand All @@ -89,24 +87,22 @@ export const diffOutput = [
type: 'object',
'x-parser-schema-id': '<anonymous-schema-1>',
},
schemaFormat: 'application/vnd.aai.asyncapi;version=2.0.0',
'x-parser-message-name': 'channelMessage',
'x-parser-message-parsed': true,
'x-parser-original-traits': [
traits: [
{
headers: {
properties: {
'some-common-header': {
type: 'string',
'x-parser-schema-id': '<anonymous-schema-7>'
'x-parser-schema-id': '<anonymous-schema-7>',
},
},
type: 'object',
'x-parser-schema-id': '<anonymous-schema-6>'
'x-parser-schema-id': '<anonymous-schema-6>',
},
'x-some-extension': 'some extension',
},
],
'x-parser-message-name': 'channelMessage',
'x-some-extension': 'some extension',
},
},
Expand Down
24 changes: 6 additions & 18 deletions test/fixtures/main.fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ export const breakingChanges = [
type: 'object',
'x-parser-schema-id': '<anonymous-schema-1>',
},
schemaFormat: 'application/vnd.aai.asyncapi;version=2.0.0',
'x-parser-message-name': 'channelMessage',
'x-parser-message-parsed': true,
'x-parser-original-traits': [
traits: [
{
headers: {
properties: {
Expand Down Expand Up @@ -67,10 +65,8 @@ export const nonBreakingChanges = [
type: 'object',
'x-parser-schema-id': '<anonymous-schema-1>',
},
schemaFormat: 'application/vnd.aai.asyncapi;version=2.0.0',
'x-parser-message-name': 'channelMessage',
'x-parser-message-parsed': true,
'x-parser-original-traits': [
traits: [
{
headers: {
properties: {
Expand Down Expand Up @@ -111,10 +107,8 @@ export const diffOutput = {
type: 'object',
'x-parser-schema-id': '<anonymous-schema-1>',
},
schemaFormat: 'application/vnd.aai.asyncapi;version=2.0.0',
'x-parser-message-name': 'channelMessage',
'x-parser-message-parsed': true,
'x-parser-original-traits': [
traits: [
{
headers: {
properties: {
Expand Down Expand Up @@ -151,10 +145,8 @@ export const diffOutput = {
type: 'object',
'x-parser-schema-id': '<anonymous-schema-1>',
},
schemaFormat: 'application/vnd.aai.asyncapi;version=2.0.0',
'x-parser-message-name': 'channelMessage',
'x-parser-message-parsed': true,
'x-parser-original-traits': [
traits: [
{
headers: {
properties: {
Expand Down Expand Up @@ -216,10 +208,8 @@ export const changesWithOverrides = {
type: 'object',
'x-parser-schema-id': '<anonymous-schema-1>',
},
schemaFormat: 'application/vnd.aai.asyncapi;version=2.0.0',
'x-parser-message-name': 'channelMessage',
'x-parser-message-parsed': true,
'x-parser-original-traits': [
traits: [
{
headers: {
properties: {
Expand Down Expand Up @@ -256,10 +246,8 @@ export const changesWithOverrides = {
type: 'object',
'x-parser-schema-id': '<anonymous-schema-1>',
},
schemaFormat: 'application/vnd.aai.asyncapi;version=2.0.0',
'x-parser-message-name': 'channelMessage',
'x-parser-message-parsed': true,
'x-parser-original-traits': [
traits: [
{
headers: {
properties: {
Expand Down

0 comments on commit 1b9b99d

Please sign in to comment.