You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "David Smiley (Jira)" <ji...@apache.org> on 2026/10/22 14:56:00 UTC
[jira] [Resolved] (SOLR-18504) OpenAPI document contains duplicate path templates for the dynamic-field endpoints
[ https://issues.apache.org/jira/browse/SOLR-18504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Smiley resolved SOLR-18504.
---------------------------------
Fix Version/s: 9.12
Resolution: Fixed
> OpenAPI document contains duplicate path templates for the dynamic-field endpoints
> ----------------------------------------------------------------------------------
>
> Key: SOLR-18504
> URL: https://issues.apache.org/jira/browse/SOLR-18504
> Project: Solr
> Issue Type: Bug
> Components: v2 API
> Affects Versions: 10.0
> Reporter: Jan Høydahl
> Assignee: Jan Høydahl
> Priority: Major
> Labels: pull-request-available
> Fix For: 10.1, 9.12
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> The published OpenAPI document describes one URL twice, under two different parameter names:
> {code:java}
> /{indexType}/{indexName}/schema/dynamicfields/{dynamicFieldName} DELETE, PUT
> /{indexType}/{indexName}/schema/dynamicfields/{fieldName} GET
> {code}
> The OpenAPI Specification forbids this — "Templated paths with the same hierarchy but different templated names MUST NOT exist, as they are identical" — and the sibling endpoint is spelled correctly as a single entry:
> {code}
> {indexType}/{indexName}/schema/fields/{fieldName} carries DELETE, GET and PUT together.
> {code}
> The cause appears to be two JAX-RS interfaces naming their {{@PathParam}} differently for the same path, with the generator emitting both without complaint.
> h3. Consequence
> Any consumer resolving a concrete URL against the document has to choose one of the two entries, and first-match-wins is wrong for whichever verbs live in the other. An editor built on this document reported "DELETE is not allowed on this path — it takes GET" for a DELETE that works against a running 10.0.0; all three verbs work in practice. Code generators are likely to produce two colliding client methods, each missing the other's operations.
> h3. Fix
> Make the two {{@PathParam}} names agree so the paths merge into one entry with all three verbs, and consider a build-time check that fails when two templates collapse to the same shape after parameter-name erasure — the same mistake is easy to repeat, and a scan of the whole document for other duplicates is worth doing in the same pass.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org