Skip to content

Commit

Permalink
Merge pull request #1722 from lnash94/2.0.x_add_example_to_oas
Browse files Browse the repository at this point in the history
[2.0.x] Add the workaround for openapi resource annotation data binding issue
  • Loading branch information
lnash94 authored Jun 18, 2024
2 parents 67cb4cb + d68f6cd commit ca68e65
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 3 deletions.
37 changes: 36 additions & 1 deletion .github/workflows/central-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ name: Publish to the Ballerina central

on:
workflow_dispatch:
inputs:
environment:
type: choice
description: Select environment
required: true
options:
- CENTRAL
- DEV CENTRAL
- STAGE CENTRAL

jobs:
publish-release:
Expand All @@ -16,8 +25,11 @@ jobs:
java-version: 17.0.7
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Publish artifact
- name: Ballerina Central Push
if: ${{ github.event.inputs.environment == 'CENTRAL' }}
env:
BALLERINA_DEV_CENTRAL: false
BALLERINA_STAGE_CENTRAL: false
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_ACCESS_TOKEN }}
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }}
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }}
Expand All @@ -26,3 +38,26 @@ jobs:
nexusPassword: ${{ secrets.NEXUS_PASSWORD }}
run: |
./gradlew clean build -PpublishToCentral=true
- name: Ballerina Central Dev Push
if: ${{ github.event.inputs.environment == 'DEV CENTRAL' }}
env:
BALLERINA_DEV_CENTRAL: true
BALLERINA_STAGE_CENTRAL: false
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_DEV_ACCESS_TOKEN }}
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }}
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.BALLERINA_BOT_TOKEN }}
run: |
./gradlew clean build -PpublishToCentral=true
- name: Ballerina Central Stage Push
if: ${{ github.event.inputs.environment == 'STAGE CENTRAL' }}
env:
BALLERINA_DEV_CENTRAL: false
BALLERINA_STAGE_CENTRAL: true
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_STAGE_ACCESS_TOKEN }}
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }}
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.BALLERINA_BOT_TOKEN }}
run: |
./gradlew clean build -PpublishToCentral=true
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
org.gradle.caching=true
group=io.ballerina
version=2.0.1-SNAPSHOT
version=2.0.2-SNAPSHOT

# Client Native Version
clientNativeVersion=1.0.1-SNAPSHOT
Expand Down
2 changes: 1 addition & 1 deletion module-ballerina-openapi/annotation.bal
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public type RequestExamples map<anydata>;
#
# + response - Response examples
# + requestBody - Request examples
public type Examples record {|
public type Examples readonly & record {|
map<ResponseExample> response?;
RequestExamples requestBody?;
|};
Expand Down

0 comments on commit ca68e65

Please sign in to comment.