get:
  summary: Show information of the packages of a project.
  description:  Show source version, md5sums and build description files of all packages belonging to a project.
  security:
    - basic_authentication: []
  parameters:
    - $ref: '../components/parameters/project_name.yaml'
    - in: query
      name: view
      schema:
        type: string
        enum:
          - info
          - issues
          - productlist
          - verboseproductlist
          - versions
      description: |
        Specify which information about each package should be returned.

        * `info`: Show source version, md5sums and build description files of all packages belonging to a project.
        * `issues`, `productlist`, `verboseproductlist`, `versions`:
          See this [other endpoint](<#/Sources - Packages/get_source__project_name_>) for details.
      example: info
    - in: query
      name: arch
      schema:
        type: string
      description: Filter by architecture name.
      example: x86_64
    - in: query
      name: noexpand
      schema:
        type: string
        enum:
          - 1
          - 0
      default: 0
      description: Set to `1` to prevent from showing some elements about packages, like `filename`, `error` or `linked` elements.
      example: 1
    - in: query
      name: nofilename
      schema:
        type: string
        enum:
          - 1
          - 0
      default: 0
      description: Set to `1` to prevent from showing filename elements. Shows only the `sourceinfo` root element.
      example: 1
    - in: query
      name: package
      schema:
        type: string
      description: Filter by package name.
      example: test
    - in: query
      name: parse
      schema:
        type: string
        enum:
          - 1
          - 0
      default: 0
      description: Set to `1` to show more details, like `originproject`, `linked package`, `name`, `version`, `release`, `subpacks`, `deps`, and `prereqs` elements.
      example: 1
    - in: query
      name: repository
      schema:
        type: string
      description: Filter by repository name.
      example: openSUSE_Tumbleweed
    - in: query
      name: withmetamd5
      schema:
        type: string
        enum:
          - 1
          - 0
      default: 0
      description: Set to `1` to show the `metamd5` attribute.
      example: 1
    - in: query
      name: withchangesmd5
      schema:
        type: string
        enum:
          - 1
          - 0
      default: 0
      description: Set to `1` to show the `revtime` element.
      example: 1
  responses:
    '200':
      description: OK. The request has succeeded.
      content:
        application/xml; charset=utf-8:
          schema:
            $ref: '../components/schemas/source/sourceinfolist.yaml'
          examples:
            A project contains three packages:
              value:
                - package: texlive-specs
                  rev: 9f5336fcf6e4521b6a9587b02087eef9
                  vrev: 25
                  srcmd5: 9f5336fcf6e4521b6a9587b02087eef9
                  verifymd5: 9b49b7314f5d0dfd8002cd329e048f73
                  filename: texlive-specs.spec
                - package: texlive-specs-w
                  rev: 9f5336fcf6e4521b6a9587b02087eef9
                  vrev: 55
                  srcmd5: 9f5336fcf6e4521b6a9587b02087eef9
                  verifymd5: 9b49b7314f5d0dfd8002cd329e048f73
                  filename: texlive-specs-w.spec
                - package: test
                  rev: 5
                  vrev: 5
                  srcmd5: e3a71081cb7245e3c09c3655dffa7384
                  verifymd5: e3a71081cb7245e3c09c3655dffa7384
                  error: bad build configuration, no build type defined or detected
            "Applying a filter doesn't return any result":
              value:
                - package: hello
                  error: 404 package 'hello' does not exist
    '400':
      description: |
        Bad Request.

        XML Schema used for body validation: [status.rng](../schema/status.rng)
      content:
        application/xml; charset=utf-8:
          schema:
            $ref: '../components/schemas/api_response.yaml'
          examples:
            Not Boolean:
              description: Passing a value different than `0` or `1` to `parse`, for example.
              value:
                code: 400
                summary: not boolean
    '401':
      $ref: '../components/responses/unauthorized.yaml'
    '404':
      description: Not Found.
      content:
        application/xml; charset=utf-8:
          schema:
            $ref: '../components/schemas/api_response.yaml'
          examples:
            Unknown Project:
              value:
                code: unknown_project
                summary: "Project not found: home:some_project"
  tags:
    - Sources - Projects
