Skip to content
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

diffRefs API has type, diff_type params but uses only type #4461

Closed
arielshaqed opened this issue Oct 25, 2022 · 0 comments · Fixed by #4462
Closed

diffRefs API has type, diff_type params but uses only type #4461

arielshaqed opened this issue Oct 25, 2022 · 0 comments · Fixed by #4462
Assignees
Labels
area/API Improvements or additions to the API area/lakectl Issues related to lakeFS' command line interface (lakectl) bug Something isn't working team/versioning-engine Team versioning engine

Comments

@arielshaqed
Copy link
Contributor

diffRefs defines both:

  • a "type" parameter, an unrestricted string;
  • a "diff_type" parameter, a string enum of two_dot and three_dot.

But it ignores diff_type and uses only type, which should take one of the
enum values supposedly checked on diff_type.

diffRefs Swagger definition

  /repositories/{repository}/refs/{leftRef}/diff/{rightRef}:
    parameters:
      - in: path
        name: repository
        required: true
        schema:
          type: string
      - in: path
        name: leftRef
        required: true
        schema:
          type: string
        description: a reference (could be either a branch or a commit ID)
      - in: path
        name: rightRef
        required: true
        schema:
          type: string
        description: a reference (could be either a branch or a commit ID) to compare against
      - $ref: "#/components/parameters/PaginationAfter"
      - $ref: "#/components/parameters/PaginationAmount"
      - $ref: "#/components/parameters/PaginationPrefix"
      - $ref: "#/components/parameters/PaginationDelimiter"
      - in: query
        name: type
        schema:
          type: string
      - in: query
        name: diff_type
        schema:
          type: string
          enum: [two_dot, three_dot]
          default: three_dot

    get:
      tags:
        - refs
      operationId: diffRefs
      summary: diff references
      responses:
        200:
          description: diff between refs
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DiffList"
        401:
          $ref: "#/components/responses/Unauthorized"
        404:
          $ref: "#/components/responses/NotFound"
        default:
          $ref: "#/components/responses/ServerError"
@arielshaqed arielshaqed added area/API Improvements or additions to the API area/lakectl Issues related to lakeFS' command line interface (lakectl) bug Something isn't working team/versioning-engine Team versioning engine labels Oct 25, 2022
@nopcoder nopcoder self-assigned this Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/API Improvements or additions to the API area/lakectl Issues related to lakeFS' command line interface (lakectl) bug Something isn't working team/versioning-engine Team versioning engine
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants