diff --git a/.github/workflows/release-package.yml b/.github/workflows/release-package.yml index c1c1860..845147e 100644 --- a/.github/workflows/release-package.yml +++ b/.github/workflows/release-package.yml @@ -19,12 +19,19 @@ jobs: conventional-changelog-conventionalcommits env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - + + - name: Get token + if: steps.semantic.outputs.new_release_published == 'true' + id: get_token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ secrets.APP_ID }} + private-key: ${{ secrets.APP_SECRET }} + - name: Commit changes if: steps.semantic.outputs.new_release_published == 'true' env: - GITHUB_TOKEN: ${{ steps.GITHUB_TOKEN }} - GH_TOKEN: ${{ github.token }} + GITHUB_TOKEN: ${{ steps.get_token.outputs.token }} FILE_TO_COMMIT: CHANGELOG.md DESTINATION_BRANCH: ${{ github.ref }} run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b92f35..c925ec0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.0.1](https://github.com/ByteBardOrg/AsyncAPI.NET/compare/v1.0.0...v1.0.1) (2025-04-24) + + +### Bug Fixes + +* missing messageId serialization ([0a1d70f](https://github.com/ByteBardOrg/AsyncAPI.NET/commit/0a1d70f21802f0059b3f9a7ba4e215e5d27b450e)) + # 1.0.0 (2025-03-28) diff --git a/release.config.js b/release.config.js index 38d1fee..5348414 100644 --- a/release.config.js +++ b/release.config.js @@ -1,5 +1,5 @@ module.exports = { - branches: ["main", "vnext"], + branches: ["v2", "vnext"], plugins: [ "@semantic-release/commit-analyzer", "@semantic-release/release-notes-generator", diff --git a/src/ByteBard.AsyncAPI/Models/AsyncApiMessage.cs b/src/ByteBard.AsyncAPI/Models/AsyncApiMessage.cs index a778f4e..ba200ed 100644 --- a/src/ByteBard.AsyncAPI/Models/AsyncApiMessage.cs +++ b/src/ByteBard.AsyncAPI/Models/AsyncApiMessage.cs @@ -99,6 +99,7 @@ public virtual void SerializeV2(IAsyncApiWriter writer) } writer.WriteStartObject(); + writer.WriteOptionalProperty(AsyncApiConstants.MessageId, this.MessageId); writer.WriteOptionalObject(AsyncApiConstants.Headers, this.Headers, (w, h) => h.SerializeV2(w)); writer.WriteOptionalObject(AsyncApiConstants.Payload, this.Payload, (w, p) => p.SerializeV2(w)); writer.WriteOptionalObject(AsyncApiConstants.CorrelationId, this.CorrelationId, (w, c) => c.SerializeV2(w)); @@ -119,4 +120,4 @@ public virtual void SerializeV2(IAsyncApiWriter writer) writer.WriteEndObject(); } } -} \ No newline at end of file +} diff --git a/test/ByteBard.AsyncAPI.Tests/Models/AsyncApiMessage_Should.cs b/test/ByteBard.AsyncAPI.Tests/Models/AsyncApiMessage_Should.cs index 890d1b3..ee2433c 100644 --- a/test/ByteBard.AsyncAPI.Tests/Models/AsyncApiMessage_Should.cs +++ b/test/ByteBard.AsyncAPI.Tests/Models/AsyncApiMessage_Should.cs @@ -243,6 +243,7 @@ public void AsyncApiMessage_WithFilledObject_Serializes() { var expected = """ + messageId: myMessage headers: title: HeaderTitle description: HeaderDescription @@ -313,6 +314,7 @@ public void AsyncApiMessage_WithFilledObject_Serializes() var message = new AsyncApiMessage { + MessageId = "myMessage", Headers = new AsyncApiJsonSchema { Title = "HeaderTitle",