Skip to content

Commit 404f753

Browse files
author
EnriqueGomez12
committed
CHANGELOG added
1 parent 346cdc7 commit 404f753

File tree

3 files changed

+29
-10
lines changed

3 files changed

+29
-10
lines changed

CHANGELOG.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [1.1.1] - 2024-06-01
9+
10+
## Added
11+
12+
### Now, support for OpenAPI 3.1 is included. These are some of the new changes:
13+
14+
- Introduces support for webhooks, allowing you to describe asynchronous notifications that your API can send to users' systems.
15+
- Replaces the nullable keyword with type arrays, aligning with JSON Schema by allowing multiple types in the type keyword.
16+
- ExclusiveMinimum and ExclusiveMaximum now take distinct values instead of boolean, simplifying their use.
17+
- Replace example with examples inside schema objects, allowing multiple examples in a YAML array format, aligning with JSON Schema.
18+
- Binary file uploads in POST requests no longer require a schema definition, simplifying the process.
19+
- For base64 encoded file uploads, OpenAPI 3.1 uses contentEncoding to specify the encoding.
20+
- For multipart file uploads with binary files, OpenAPI 3.1 uses contentMediaType to specify the media type.
21+
- The $schema keyword is now allowed in OpenAPI 3.1, enabling the definition of the JSON Schema dialect a model uses, which can be different drafts or custom dialects.
22+
- Introduces support for mutual TLS (mTLS), providing two-way authentication between the client and server for enhanced security.
23+
- General improvements in the alignment and clarity of the specification, including enhancements to OAuth 2.0 support.
24+
- Added support for the identifier keyword in the License Object, allowing the definition of an SPDX license expression for the API.
25+
- Added compatibility with the dosonarapi plugin(now, renamed to SonarOpenAPI-Rules), which now provides many rule definitions for OpenAPI 3.1
26+

sonar-openapi-plugin/src/main/java/org/apiaddicts/apitools/dosonarapi/plugin/OpenApiAnalyzer.java

-2
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,10 @@
2020
package org.apiaddicts.apitools.dosonarapi.plugin;
2121

2222
import com.sonar.sslr.api.RecognitionException;
23-
2423
import java.io.IOException;
2524
import java.util.Collections;
2625
import java.util.List;
2726
import java.util.Set;
28-
2927
import org.apiaddicts.apitools.dosonarapi.openapi.OpenApiConfiguration;
3028
import org.apiaddicts.apitools.dosonarapi.plugin.cpd.OpenApiCpdAnalyzer;
3129
import org.sonar.api.batch.fs.InputFile;

sonar-openapi-plugin/src/main/java/org/apiaddicts/apitools/dosonarapi/plugin/OpenApiScannerSensor.java

+3-8
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ public OpenApiScannerSensor(CheckFactory checkFactory, FileLinesContextFactory f
4747
}
4848

4949
public OpenApiScannerSensor(CheckFactory checkFactory, FileLinesContextFactory fileLinesContextFactory, NoSonarFilter noSonarFilter, @Nullable OpenApiCustomRuleRepository[] customRuleRepositories) {
50-
// customRulesRepositories is injected by the context, if present
5150
this.checks = OpenApiChecks.createOpenApiCheck(checkFactory)
5251
.addChecks(CheckList.REPOSITORY_KEY, CheckList.getChecks())
5352
.addCustomChecks(customRuleRepositories);
@@ -65,18 +64,14 @@ public void describe(SensorDescriptor descriptor) {
6564
@Override
6665
public void execute(SensorContext context) {
6766
FilePredicates p = context.fileSystem().predicates();
68-
//OpenApiProperties openApiProperties = new OpenApiProperties();
69-
70-
//scanFiles(context, p, openApiProperties.getV2FilesPattern(context), true);
71-
//scanFiles(context, p, openApiProperties.getV3FilesPattern(context), false);
7267
scanFiles(context, p);
7368
}
7469

75-
public void scanFiles(SensorContext context, FilePredicates p/*, String[] pathPatterns, boolean isV2*/) {
70+
public void scanFiles(SensorContext context, FilePredicates p) {
7671
Iterable<InputFile> it = context.fileSystem().inputFiles(
7772
p.and(p.hasType(InputFile.Type.MAIN),
78-
p.hasLanguage(OpenApi.KEY)/*,
79-
p.matchesPathPatterns(pathPatterns)*/));
73+
p.hasLanguage(OpenApi.KEY)
74+
));
8075
List<InputFile> list = new ArrayList<>();
8176
it.forEach(list::add);
8277
List<InputFile> inputFiles = Collections.unmodifiableList(list);

0 commit comments

Comments
 (0)