Skip to content

Openapi add jenkins scripts fix linting#828

Open
cryptoBeliever wants to merge 4 commits intodevfrom
openapi_add_jenkins_scripts_fix_linting
Open

Openapi add jenkins scripts fix linting#828
cryptoBeliever wants to merge 4 commits intodevfrom
openapi_add_jenkins_scripts_fix_linting

Conversation

@cryptoBeliever
Copy link
Copy Markdown
Contributor

Summary

Add CI infrastructure for the OpenAPI module (analogous to symbol monorepo) and fix all yamllint
errors across the specification files.

CI & tooling

  • Add Jenkinsfile with defaultCiPipeline (environment: javascript)
  • Add scripts/ci/ (setup_lint, lint, build, test) and scripts/publish.sh
  • Add package.json scripts: lint:openapi, verify-links, postman, version:prepare, version:pack
  • Add @redocly/cli, markdown-link-check, openapi-to-postmanv2 as dev dependencies
  • Add .redocly.yaml and .markdown-link-check.json configuration
  • Add CONTRIBUTING.md and CODE_OF_CONDUCT.md
  • Register openapi module in .gitlintmodules

Yamllint fixes (1238 errors → 0)

  • Remove redundant quotes (quoted-strings: 677 errors)
  • Remove trailing whitespace (91 errors)
  • Add missing newline at end of file (54 errors)
  • Wrap long lines to stay within 140 character limit (62 errors)
  • Fix indentation issues (4 errors)
  • Fix empty brackets spacing and extra blank lines (2 errors)

@cryptoBeliever cryptoBeliever requested a review from Wayonb April 15, 2026 18:10
Copy link
Copy Markdown
Contributor

@Wayonb Wayonb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍🏾
a few comments consistency with double vs single quotes

Comment thread openapi/scripts/publish.sh Outdated
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "${ROOT_DIR}"

VERSION="$(node -p "require('./package.json').version")"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of running node directly, shouldn't npm run version work? 🤔

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, thank you 👍 Replaced with npm run version --silent

Comment thread openapi/scripts/publish.sh Outdated
cd "${ROOT_DIR}"

VERSION="$(node -p "require('./package.json').version")"
TAG="${OPENAPI_RELEASE_TAG:-openapi-v${VERSION}}"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tag should be openapi/v${version}

Comment thread openapi/scripts/publish.sh Outdated

echo "Preparing OpenAPI release artifacts for ${TAG}"
npm run build
npm run postman
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason postman is not part of the build command? it seems to create a file that is part of the build. 🤔

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. Makes sense, added to build.

fi

echo "Creating GitHub release ${TAG}"
gh release create "${TAG}" \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am assuming this publish script should also run in Jenkins? Or just local for now?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assumed local only for now. Do you think it makes sense to have it on Jenkins? If so, what adjustments should I make? 🤔

Comment thread openapi/spec/openapi.yml Outdated
openapi: 3.1.0
info:
"$ref": "./info.yml"
"$ref": ./info.yml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be able to remove the " around the $ref?

"8193": "./ProvisionNamespaceTransaction.yml"
"16385": "./MosaicDefinitionCreationTransaction.yml"
"16386": "./MosaicSupplyChangeTransaction.yml"
"257": ./TransferTransaction.yml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if quotes are needed here, but maybe a single quote instead of double

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quotes are needed and should be replaced with single quotes (and, for consistency, in a few other places).

@cryptoBeliever cryptoBeliever requested a review from Wayonb April 20, 2026 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants