Skip to content

chore: project setup — Makefile, CI/CD, GitHub templates, copilot instructions#2

Merged
aru-amedeo merged 7 commits into
mainfrom
feat/project-setup
May 15, 2026
Merged

chore: project setup — Makefile, CI/CD, GitHub templates, copilot instructions#2
aru-amedeo merged 7 commits into
mainfrom
feat/project-setup

Conversation

@aru-amedeo
Copy link
Copy Markdown
Member

@aru-amedeo aru-amedeo commented May 15, 2026

Description

This PR sets up the full developer experience infrastructure for the arubacloud-api-portal open source project.

Closes #

Type of change

  • New feature / improvement
  • Documentation update
  • CI/CD change
  • Refactor / chore

Changes made

  • Renamed project from cmp-catalog-api to arubacloud-api-portal in package.json, package-lock.json, jest.config.ts
  • Added Makefile with targets: install, start, build, clean, gen-api-docs, clean-api-docs, regen-api-docs, pre-pr
  • Rewrote README.md with badges, quick start, API coverage table, and project structure
  • Added CONTRIBUTING.md with full development workflow, branch naming, commit conventions, PR process, and troubleshooting
  • Added .github/workflows/deploy.yml — GitHub Pages deployment on push to main
  • Added .github/workflows/pr-validation.yml — build validation on every PR to main
  • Added .github/ISSUE_TEMPLATE/ — bug, feature, documentation, and OpenAPI update templates
  • Added .github/PULL_REQUEST_TEMPLATE.md
  • Added .github/copilot-instructions.md — full AI assistant context for this project
  • Fixed gen-api-docs/clean-api-docs npm scripts to pass the required all argument
  • Fixed gen-api-docs:version/clean-api-docs:version scripts for compute v1.1
  • Added webpack fallback plugin in docusaurus.config.js to suppress postman-code-generators path errors

OpenAPI spec changes

N/A — no spec files were modified.

Known issue

⚠️ Compute v1.0 base endpoint files (e.g. list-cloud-servers.api.mdx) are not regenerated by gen-api-docs all when a versions key is present in the plugin config. This needs further investigation and will be addressed in a follow-up issue.

Checklist

  • Changes have been tested locally (make start)
  • No sensitive data has been committed
  • CONTRIBUTING.md updated

…ot instructions

- Rename project to arubacloud-api-portal
- Add Makefile with install, start, build, clean, regen-api-docs, pre-pr targets
- Add CONTRIBUTING.md with full development workflow guide
- Rewrite README.md with badges, quick start, API coverage table
- Add .github/workflows/deploy.yml for GitHub Pages deployment
- Add .github/workflows/pr-validation.yml for PR build checks
- Add .github/ISSUE_TEMPLATE (bug, feature, docs, openapi)
- Add .github/PULL_REQUEST_TEMPLATE.md
- Add .github/copilot-instructions.md for AI assistant context
- Fix gen-api-docs/clean-api-docs scripts to pass 'all' argument
- Fix gen-api-docs:version/clean-api-docs:version for compute v1.1
- Add webpack fallback plugin to suppress postman-code-generators path errors
Run clean-api-docs + gen-api-docs all to sync generated .api.mdx files
with the installed theme version and fix @theme/ResponseSamples errors.
Also runs gen-api-docs:version for compute v1.1.

NOTE: compute v1.0 base endpoint files are currently not regenerated
by gen-api-docs all when a versions key is present in the config.
This requires further investigation.
The build was failing on all 194 API pages with:
  Error: useTabsContext() must be used within a Tabs component

This is a version incompatibility between docusaurus-plugin-openapi-docs
v4.7.1 and Docusaurus 3.10.1 (which ^3.7.0 resolved to in CI). The
plugin's SchemaTabs/MimeTabs components conflict with how Docusaurus
3.10.x handles the Tabs React context during SSG.

Pin all @docusaurus/* packages to exact version 3.7.0 and regenerate
package-lock.json to lock CI to the compatible version.
Two separate bugs were blocking the build:

1. useTabsContext() SSG crash (all 194 pages):
   Introduced in docusaurus-plugin-openapi-docs 4.7.1. The SchemaTabs/
   MimeTabs components call useTabsContext() unconditionally during SSG,
   but Docusaurus throws when useTabsContext() is called outside a Tabs
   context. Pinning the plugin to 4.1.0 avoids this regression.

2. webpack ProgressPlugin schema error:
   Pinning @docusaurus/core to 3.7.0 (exact) caused a webpack 5.106
   schema validation error because Docusaurus 3.7.0 passes reporter:null
   to ProgressPlugin, which webpack 5.106 no longer accepts. This was
   fixed in later Docusaurus versions; we stay on 3.10.1 via ^3.7.0.

Final combination: Docusaurus 3.10.1 + plugin 4.1.0 + theme 4.1.0.
Regenerated all API docs with plugin 4.1.0.
- Add postinstall.js to patch docusaurus-theme-openapi-docs@4.1.0:
  * Fix useTabs(props) -> useTabsContextValue(props) in 6 tab components
    (SchemaTabs, MimeTabs, OperationTabs, DiscriminatorTabs, ApiTabs, CodeTabs)
  * Wrap TabsComponent JSX in TabsProvider so TabItem context reads work
  * Downgrade duplicate sidebar translation key error to warning (pre-existing
    issue now surfaced by Docusaurus 3.10.x strict check)
- Fix gen-api-docs:version and clean-api-docs:version command syntax:
  'compute 1.1' -> 'compute:1.1' (plugin expects <id:version> format)
- Regenerate docs/documents/compute/1.1/ with corrected plugin invocation;
  create-cloud-server.api.mdx now includes required ResponseSamples import
@aru-amedeo aru-amedeo merged commit 0f451d7 into main May 15, 2026
1 check passed
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.

1 participant