SOLR-18152: improve body format OpenAPI annotations to fully communicate SchemaDesigner API - #4819
SOLR-18152: improve body format OpenAPI annotations to fully communicate SchemaDesigner API#4819epugh wants to merge 7 commits into
Conversation
|
Woot! thanks @gerlowskija this unblocks the last steps in SchemaDesigner to v2 work! |
There was a problem hiding this comment.
🟡 Changes recommended
The template change can generate references to nonexistent Java model members.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Improves Schema Designer OpenAPI contracts and generated-client request handling.
Changes:
- Exposes kebab-case add-operation keys.
- Documents dynamic request properties.
- Updates generated SolrJ setters and round-trip coverage.
File summaries
| File | Description |
|---|---|
solr/solrj/src/resources/java-template/api.mustache |
Updates generated request setters. |
solr/core/src/test/org/apache/solr/handler/designer/TestSchemaDesignerSolrJ.java |
Exercises dynamic update properties. |
solr/api/src/java/org/apache/solr/client/api/model/UpsertFieldTypeOperation.java |
Documents open-ended field-type attributes. |
solr/api/src/java/org/apache/solr/client/api/model/UpsertFieldOperation.java |
Documents open-ended field attributes. |
solr/api/src/java/org/apache/solr/client/api/model/UpsertDynamicFieldOperation.java |
Documents open-ended dynamic-field attributes. |
solr/api/src/java/org/apache/solr/client/api/model/SchemaDesignerUpdateRequestBody.java |
Exposes arbitrary update properties in OpenAPI. |
solr/api/src/java/org/apache/solr/client/api/model/SchemaDesignerAddRequestBody.java |
Exposes kebab-case operation names. |
solr/api/src/java/org/apache/solr/client/api/endpoint/SchemaDesignerApi.java |
Enables generated dynamic-property setters. |
Review details
- Files reviewed: 8/8 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
… endpoints that are not strong typed.
|
Okay, once I get a good CI build I plan on merging htis. |
… the best way to do it.
There was a problem hiding this comment.
🟡 Changes recommended
The generated JavaScript add-field regression path lacks automated coverage.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 16/16 changed files
- Comments generated: 1
- Review effort level: Balanced
| SchemaDesignerV2.addSchemaObject($scope.currentSchema, { | ||
| schemaVersion: $scope.schemaVersion, | ||
| schemaDesignerAddRequestBody: addData |
https://issues.apache.org/jira/browse/SOLR-18152
Description
During integration of SchemaDesigner V2 APIS into Admin UI, it was flagged that we don't properly document the addField / add-field commands.
Before today's fix, the generated JS/SolrJ clients would have sent
{"addField": {...}}(camelCase) , but the server doesn't consume that, it consumesadd-field.Solution
Now we do:
This applies to
add-dynamic-field,add-copy-field,add-field-typeas well!Tests
Manual and unit