Skip to content

Fix Redoc schema script name and harden schema processing#13

Open
dshevtsov wants to merge 2 commits intomainfrom
ds_fix
Open

Fix Redoc schema script name and harden schema processing#13
dshevtsov wants to merge 2 commits intomainfrom
ds_fix

Conversation

@dshevtsov
Copy link

@dshevtsov dshevtsov commented Mar 11, 2026

Description

Fixes script naming consistency, adds schema comparison and defensive handling for PaaS schema processing, and ignores the Cursor IDE folder.

Summary of changes

  • Script naming: README and get-schemas-for-redoc now reference process-paas-schemas-for-redoc instead of process-schemas-for-redoc so docs and scripts stay in sync.
  • Schema comparison: New compare_yaml_schemas() in bin/functions.sh prints SHA-256 checksums, line/byte counts, and pairwise diff results for the three YAML schemas (admin, customer, guest). It is invoked at the end of process-paas-schemas-for-redoc for quick verification.
  • PaaS edit robustness: edit_paas() Ruby one-liners now use defensive parsing (JSON.load(...) || {}, s["info"] ||= {}) and normalize basePath to a single leading slash, avoiding failures on missing or malformed fields.
  • PathSorter: sortKeys() in src/PathSorter.js safely handles null/undefined by returning {} instead of throwing.
  • .gitignore: Added .cursor so Cursor IDE metadata is not committed.

@dshevtsov dshevtsov requested a review from jhadobe March 11, 2026 23:38
@dshevtsov dshevtsov self-assigned this Mar 11, 2026
@dshevtsov dshevtsov added the bug Something isn't working label Mar 11, 2026
- Introduced a new function `compare_yaml_schemas` in `functions.sh` to compare YAML schema outputs, including checksums and line/byte counts.
- Updated the `process-paas-schemas-for-redoc` script to call the new comparison function after processing schemas.
- Corrected the script name in the README for clarity.
@dshevtsov dshevtsov added the enhancement New feature or request label Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant