Skip to content

Commit b20d527

Browse files
authored
Fix/W-17909207/when-example-is-empty-method-documentation-remains-blank (#42)
* fix: handle empty string in value check for code rendering * 4.3.10 * fix: update Node.js version to 16 in deployment workflow * fix: update actions/cache to version 2 in deployment workflow * fix: update Node.js version to 18 and actions/cache to version 3 in deployment workflow * fix: downgrade Node.js version to 16 in deployment workflow
1 parent 8897708 commit b20d527

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

.github/workflows/deployment.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,14 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
os: [ubuntu-20.04]
21-
# os: [ubuntu-18.04, ubuntu-20.04]
2221
runs-on: ${{ matrix.os }}
2322
steps:
2423
- uses: actions/checkout@v2
2524
- uses: actions/setup-node@v1
2625
with:
27-
node-version: 14
26+
node-version: 16
2827
- uses: microsoft/playwright-github-action@v1
29-
- uses: actions/cache@v1
28+
- uses: actions/cache@v3
3029
with:
3130
path: ~/.npm
3231
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -43,9 +42,9 @@ jobs:
4342
- uses: actions/checkout@v2
4443
- uses: actions/setup-node@v1
4544
with:
46-
node-version: 14
45+
node-version: 16
4746
- uses: microsoft/playwright-github-action@v1
48-
- uses: actions/cache@v1
47+
- uses: actions/cache@v3
4948
with:
5049
path: ~/.npm
5150
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -58,7 +57,7 @@ jobs:
5857
tag:
5958
name: "Publishing release"
6059
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
61-
needs:
60+
needs:
6261
- test_linux
6362
- test_win
6463
runs-on: ubuntu-latest
@@ -69,9 +68,9 @@ jobs:
6968
fetch-depth: 0
7069
- uses: actions/setup-node@v2
7170
with:
72-
node-version: '14.x'
71+
node-version: '16.x'
7372
registry-url: 'https://registry.npmjs.org'
74-
- uses: actions/cache@v1
73+
- uses: actions/cache@v3
7574
with:
7675
path: ~/.npm
7776
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -98,4 +97,4 @@ jobs:
9897
prerelease: false
9998
- run: npm publish --access public
10099
env:
101-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
100+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@api-components/api-resource-example-document",
33
"description": "A viewer for examples in a resource based on AMF model",
4-
"version": "4.3.9",
4+
"version": "4.3.10",
55
"license": "Apache-2.0",
66
"main": "index.js",
77
"module": "index.js",

src/ApiExampleRender.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ export class ApiExampleRender extends LitElement {
235235
// This just sanitizes the schema and renders unprocessed data.
236236
this._codeValue = value;
237237
// @ts-ignore
238-
} else if (value || value === false || value === 0) {
238+
} else if (value || value === false || value === 0 || value === '') {
239239
let lang;
240240
const type = this.mediaType;
241241
if (type) {

0 commit comments

Comments
 (0)