-
Notifications
You must be signed in to change notification settings - Fork 7
feat: Add linter tool for Siemens REST API guidelines #66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
# Conflicts: # package-lock.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a comprehensive API linter tool for enforcing Siemens REST API guidelines. The tool is based on Spectral and includes rulesets, CLI tooling, HTML reporting, and extensive test coverage.
Key Changes:
- Added new
api-linterpackage to the monorepo with CLI and programmatic interfaces - Implemented rulesets covering media types, versioning, error reporting, pagination, security, and common operations
- Created HTML report generation with Bootstrap UI
- Added comprehensive test suite with test data for various scenarios
Reviewed changes
Copilot reviewed 106 out of 106 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Added api-linter to workspace packages |
| api-linter/package.json | Package configuration with dependencies and CLI entry point |
| api-linter/src/index.js | Main CLI implementation with linting logic and report generation |
| api-linter/src/argument.js | Command-line argument parsing configuration |
| api-linter/src/extension.js | Programmatic API for integration |
| api-linter/src/templates/template.html | HTML report template with Bootstrap styling |
| api-linter/rulesets/*.yml | Ruleset definitions for API guidelines |
| api-linter/rulesets/*.js | Dynamic ruleset configurations (versioning, security) |
| api-linter/rulesets/functions/*.js | Custom validation functions for rules |
| api-linter/test/*.js | Jest test files for different rule categories |
| api-linter/test/testdata//.yml | Test data fixtures for various scenarios |
| api-linter/README.md | Documentation for installation and usage |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
A linter tool with Rulesets for developers follow Siemens Api Guidelines