Skip to content

Conversation

@MMaiero
Copy link
Member

@MMaiero MMaiero commented Aug 30, 2025

Added OpenAPI mapping to improve user experience when working with Eclipse Kura REST apis

…t bundle

- Add io.swagger.v3.oas.annotations package imports to test bundle manifest
- Resolve missing dependency issue preventing test compilation and execution
- Import all required Swagger v3 annotation packages with version 2.1.0
- Add comprehensive OpenAPI documentation configuration and README
- Update main bundle manifest and POM with proper OpenAPI dependencies

Fixes compilation errors in org.eclipse.kura.rest.system.provider.test when
using classes from the host bundle that reference Swagger annotations.

The test bundle (fragment) needs access to the same OpenAPI annotation packages
that are used by the host bundle's SystemRestService class for proper test execution.

Signed-off-by: MMaiero <[email protected]>
@MMaiero
Copy link
Member Author

MMaiero commented Aug 30, 2025

@salvatore-coppola Does this make sense as an initial effort (potentially to extend)?

Copy link

Copilot AI left a 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 OpenAPI/Swagger documentation support to the Eclipse Kura System REST API bundle, enhancing developer experience by providing comprehensive API documentation, interactive testing capabilities, and client SDK generation support.

  • Added OpenAPI annotations to existing REST endpoints for system properties
  • Integrated Swagger dependencies and Maven plugin for documentation generation
  • Created comprehensive OpenAPI configuration with security schemes and metadata

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
SystemRestService.java Added OpenAPI annotations to REST endpoints for comprehensive API documentation
OpenApiConfig.java New configuration class defining API metadata, security schemes, and server information
FrameworkPropertiesDTO.java Added schema annotations for API documentation
FilterDTO.java Added schema annotations with detailed property descriptions and examples
pom.xml files Added Swagger dependencies and Maven plugin for OpenAPI generation
MANIFEST.MF files Added import packages for Swagger annotations
README-OpenAPI.md Comprehensive documentation for OpenAPI integration and usage
.vscode/settings.json Minor VS Code configuration update

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.


import io.swagger.v3.oas.annotations.media.Schema;

@SuppressWarnings("all")
Copy link

Copilot AI Aug 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using @SuppressWarnings("all") is overly broad and suppresses all warnings, which can hide legitimate issues. Consider using more specific warning suppressions or addressing the actual warnings instead.

Suggested change
@SuppressWarnings("all")

Copilot uses AI. Check for mistakes.
@Path(REST_APP_ID)
@Tag(name = "System", description = "System information and properties API for Eclipse Kura gateway")
@SecurityRequirement(name = "basicAuth")
@SuppressWarnings("all")
Copy link

Copilot AI Aug 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using @SuppressWarnings("all") is overly broad and suppresses all warnings, which can hide legitimate issues. Consider using more specific warning suppressions or addressing the actual warnings instead.

Suggested change
@SuppressWarnings("all")

Copilot uses AI. Check for mistakes.
* This class defines the overall API specification metadata, security schemes,
* and server information for the System API.
*/
@SuppressWarnings("all")
Copy link

Copilot AI Aug 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using @SuppressWarnings("all") is overly broad and suppresses all warnings, which can hide legitimate issues. Consider using more specific warning suppressions or addressing the actual warnings instead.

Suggested change
@SuppressWarnings("all")

Copilot uses AI. Check for mistakes.
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants