Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-15736

Enforce ongoing v1<->v2 API consistency

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • v2 API

    Description

      Since its inception, keeping the v1 and v2 APIs in sync has been a serious challenge. Historically, nothing has enforced consistency across the two APIs - to the somewhat predictable result that developers continued to add parameters and even whole endpoints to v1 without realizing they were leaving out the similar changes to v2.

      SOLR-15737 strives to ensure that each v1 API has a v2 equivalent, but this only ensures consistency at a point in time. To prevent any new gaps from opening up, we should find some way to ensure that any further API additions include v2.

      Up for debate is what the best way to do this is.

      Though other better ones might be possible, one approach would be to refactor SolrJ's SolrRequest classes to be implemented to use the annotated v2 POJOs that define many V2 APIs. This would force devs looking to expose a new API param in SolrJ to first add it to the corresponding V2 Api POJO. (Though it wouldn't provide much enforcement for totally new API endpoints.)

      Attachments

        Issue Links

          Activity

            People

              gerlowskija Jason Gerlowski
              gerlowskija Jason Gerlowski
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 50m
                  2h 50m