{"id":21323182,"url":"https://github.com/schwarzit/api-linter-service","last_synced_at":"2025-07-12T05:31:23.000Z","repository":{"id":38197000,"uuid":"454681467","full_name":"SchwarzIT/api-linter-service","owner":"SchwarzIT","description":"RESTful service to provide API linting as-a-service","archived":false,"fork":false,"pushed_at":"2024-05-02T11:11:45.000Z","size":308,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-05-02T23:42:47.669Z","etag":null,"topics":["linter","openapi"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SchwarzIT.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-02T07:32:17.000Z","updated_at":"2024-05-02T11:11:46.000Z","dependencies_parsed_at":"2024-05-02T12:39:36.870Z","dependency_job_id":null,"html_url":"https://github.com/SchwarzIT/api-linter-service","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SchwarzIT%2Fapi-linter-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SchwarzIT%2Fapi-linter-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SchwarzIT%2Fapi-linter-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SchwarzIT%2Fapi-linter-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SchwarzIT","download_url":"https://codeload.github.com/SchwarzIT/api-linter-service/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225796611,"owners_count":17525532,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["linter","openapi"],"created_at":"2024-11-21T20:21:16.990Z","updated_at":"2024-11-21T20:21:17.732Z","avatar_url":"https://github.com/SchwarzIT.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# API Linting Service\n\n[![SIT](https://img.shields.io/badge/SIT-awesome-blueviolet.svg)](https://jobs.schwarz)\n\n## Prerequisites / general idea\n\nGeneral idea behind this API implementation is to provide an API as a service based on the awesome [spectral schema linter](https://github.com/stoplightio/spectral) and it´s nodeJS based SDK.\n\n## Main Technologies\n\n* [Docker](https://www.docker.com/)\n* [nodeJS](https://nodejs.dev/)\n* [nestJS](https://nestjs.com/)\n* [Spectral schema linter](https://github.com/stoplightio/spectral)\n\n## Spectral API Validation\n\nThe API is build on top of the [@stoplight/spectral-core](https://www.npmjs.com/package/@stoplight/spectral-core) SDK for nodeJS to execute API validations that follow the \"Open API Specification\" pattern. Spectral itself is Open Source and able to validate any json or yaml defined schemas with dedicated rulesets, while playing it´s strengths definitely in validation of OpenAPI Specs.\n\n## Build / Setup the local dev env\n\nFirst make sure to have installed the following OS dependencies for development:\n* [Docker Desktop](https://www.docker.com/products/docker-desktop)\n* [node LTS](https://nodejs.org/en/)\n* IDE of your choice like [Visual Studio Code](https://code.visualstudio.com/)\n\nDownload all local development dependencies via (just for code completion, code will be executed in docker):\n\n```bash\n$ npm install\n```\n\nBuild the Docker-Compose based local dev environment\n\n```bash\n$ docker-compose build --no-cache\n```\n\n## Running the API in \"debug\" mode\n\nPer default the API runs in \"debug\" mode during local development.\n\nYou should always start the API using Docker-Compose.\n\n```bash\n$ docker-compose build\n$ docker-compose up (-d)\n```\n\n## Running the API in \"prod\" mode\n\n```bash\n$ docker-compose -f docker-compose-prod-sim.yml build\n$ docker-compose -f docker-compose-prod-sim.yml up (-d)\n```\n\n### JS rules migration at application start up\n\nThe API downloads a dedicated spectral ruleset behind a configurable url as a base for further migration of this files into JavaScript. No need to redeploy the application after changing your spectral ruleset, restart is enough and you get served with your recently updated and published ruleset.\n\nWithout changing the download url the API uses [SchwarzIT API Rules](https://github.com/SchwarzIT/api-linter-rules) as default for API linting.\n\n## Test\n\n```bash\n# unit tests\n$ npm run test\n\n# e2e tests\n$ npm run test:e2e\n\n# test coverage\n$ npm run test:cov\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschwarzit%2Fapi-linter-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschwarzit%2Fapi-linter-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschwarzit%2Fapi-linter-service/lists"}