Skip to content

Commit

Permalink
Merge pull request #158 from kafkajs/backwards-compatibility-hack-155
Browse files Browse the repository at this point in the history
Don't include the schemaType field in API requests when type is Avro
  • Loading branch information
Nevon authored Nov 3, 2021
2 parents 72009d5 + 84c4db4 commit 823ecec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- job: lint
displayName: Lint
pool:
vmImage: 'Ubuntu 16.04'
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
inputs:
Expand All @@ -34,7 +34,7 @@ jobs:
- job: build
displayName: Build
pool:
vmImage: 'Ubuntu 16.04'
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
inputs:
Expand All @@ -48,7 +48,7 @@ jobs:
displayName: Tests
dependsOn: lint
pool:
vmImage: 'Ubuntu 16.04'
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
inputs:
Expand All @@ -68,7 +68,7 @@ jobs:
- build
- unit_tests
pool:
vmImage: 'Ubuntu 16.04'
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
inputs:
Expand All @@ -95,7 +95,7 @@ jobs:
- lint
- unit_tests
pool:
vmImage: 'Ubuntu 16.04'
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
inputs:
Expand Down
4 changes: 2 additions & 2 deletions src/SchemaRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export default class SchemaRegistry {
const response = await this.api.Subject.register({
subject: subject.name,
body: {
schemaType: confluentSchema.type,
schemaType: confluentSchema.type === SchemaType.AVRO ? undefined : confluentSchema.type,
schema: confluentSchema.schema,
},
})
Expand Down Expand Up @@ -234,7 +234,7 @@ export default class SchemaRegistry {
const response = await this.api.Subject.registered({
subject,
body: {
schemaType: confluentSchema.type,
schemaType: confluentSchema.type === SchemaType.AVRO ? undefined : confluentSchema.type,
schema: confluentSchema.schema,
},
})
Expand Down

0 comments on commit 823ecec

Please sign in to comment.