-
Notifications
You must be signed in to change notification settings - Fork 0
Cognitivegears/issue14 #29
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
Changes to make Java work on M4 mac Added JSON schema generator Added unit testing and some refactoring Changes to generate body schema Make devcontainer work with docker desktop Refactoring part 1 Added Lombok Refactored and cleaned up
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 introduces large-scale changes to support JSON Schema generation and enhances test coverage for the Modsecurity3 generator. Key changes include:
- New and expanded unit tests for model processing, JSON schema type mapping, and generator operations.
- New services and utility classes for JSON Schema generation, configuration, and pattern generation.
- Updates to CI/CD pipelines and documentation for testing and integration.
Reviewed Changes
Copilot reviewed 36 out of 41 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/test/java/com/oashield/openapi/generators/modsecurity3/tests/ModelProcessingTest.java | New tests verifying JSON Schema generation and model properties. |
| src/test/java/com/oashield/openapi/generators/modsecurity3/tests/JsonSchemaTypeMapperTest.java | Added tests for case-insensitive type mapping and default behaviors. |
| src/main/java/com/oashield/openapi/generators/modsecurity3/(TemplateManager, PatternGenerationService, OperationProcessor, ModelProcessor, JsonSchemaGenerator, ConfigurationManager) | New service classes for JSON Schema generation, processing operations/models, template management, and configuration. |
| README.md & .github/workflows/*.yml | Updated documentation and CI workflow definitions for unit and integration tests. |
Files not reviewed (5)
- .devcontainer/devcontainer.json: Language not supported
- .vscode/settings.json: Language not supported
- pom.xml: Language not supported
- src/main/resources/modsecurity3/config.mustache: Language not supported
- src/main/resources/modsecurity3/mainconfig.mustache: Language not supported
Comments suppressed due to low confidence (1)
src/test/java/com/oashield/openapi/generators/modsecurity3/tests/ModelProcessingTest.java:75
- The error message for checking the 'tags' property is misleading. Consider updating it to 'Pet model should have tags property' to better reflect the context.
assertTrue(petProperties.has("tags"), "Tag model should be included");
| * @param baseNamePrefix The prefix to add to the property name | ||
| * @return A list of flattened properties | ||
| */ | ||
| public List<CodegenProperty> flattenModel(CodegenProperty currentProperty, String baseNamePrefix) { |
Copilot
AI
May 2, 2025
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.
A similar flattenModel method is also implemented in ModelProcessor. Consider refactoring to a common utility to reduce duplication and improve maintainability.
Large scale changes for supporting JSON schema and additional test changes.