This repository contains a set of custom SonarQube rules specifically designed to analyze and improve the quality of OpenAPI specifications. By integrating these rules, teams can ensure best practices, maintainability, and consistency in their API definitions.
This repository is intended for community use, it can be modified and adapted without commercial use. If you need a version, support or help for your enterprise or project, please contact us π§ [email protected]
π‘ If you have an idea for a rule but you are not sure that everyone needs it you can implement a custom rule available only for you.
π’ If doSonarApi is part of your organization's toolkit, we kindly encourage you to include your company's name in our Adopters list. π This not only significantly boosts the project's visibility and reputation but also represents a small yet impactful way to give back to the project.
Organization | Description of Use / Referenc |
---|---|
CloudAppi | Apification and generation of microservices |
Madrid Digital | Generation of microservices |
Apiquality | Generation of microservices |
We're an inclusive and open community, welcoming you to join our effort to enhance ApiAddicts, and we're excited to prioritize tasks based on community input, inviting you to review and collaborate through our GitHub issue tracker.
Feel free to drop by and greet us on our GitHub discussion or Discord chat. You can also show your support by giving us some GitHub stars βοΈ, or by following us on Twitter, LinkedIn, and subscribing to our YouTube channel! π
In pom.xml
configure:
<properties>
<!-- Optional, When is set only the language specified is analyzed -->
<sonar.language>openapi</sonar.language>
<!-- Optional, Default value is src/main,pom.xml -->
<sonar.sources>.</sonar.sources>
</properties>
mvn sonar:sonar -Dsonar.host.url=<HOST> -Dsonar.login=<KEY>
Download the sonar-scanner
from https://docs.sonarqube.org/latest/analysis/scan/sonarscanner/ and make it accessible.
In sonar-project.properties
(file in root project folder) configure:
# must be unique in a given SonarQube instance
sonar.projectKey=test:test
# this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1.
sonar.projectName=OpenAPI plugin tests
sonar.projectVersion=1.0-SNAPSHOT
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
# This property is optional if sonar.modules is set.
sonar.sources=.
# Encoding of the source code. Default is default system encoding
sonar.sourceEncoding=UTF-8
# Select the language to use for analysis
sonar.language=openapi
sonar-scanner -Dsonar.host.url=<HOST> -Dsonar.login=<KEY>
This plugin is supported by SonarQube versions greater or equal to 6.7.4
Version |
---|
6.7.4 |
7.9-community |
8.3-community |