openapi: 3.0.1
info:
  title: STIG Manager API
  description: An API for managing evaluations of Security Technical Implementation Guide (STIG) assessments.
  contact:
    name: STIG Manager OSS Project
    url: https://github.com/NUWCDIVNPT/stig-manager
  version: 'v1'
servers:
  - url: 'http://localhost:64001/api'
paths:
  /assets:
    get:
      tags:
        - Asset
      summary: Return a list of Assets accessible to the requester
      operationId: getAssets
      parameters:
        - $ref: '#/components/parameters/CollectionIdQuery'
        - $ref: '#/components/parameters/LabelIdQuery'
        - $ref: '#/components/parameters/LabelNameQuery'
        - $ref: '#/components/parameters/LabelMatchQuery'
        - $ref: '#/components/parameters/NameQuery'
        - $ref: '#/components/parameters/NameMatchQuery'
        - $ref: '#/components/parameters/MetadataQuery'
        - $ref: '#/components/parameters/BenchmarkIdQuery'
        - $ref: '#/components/parameters/AssetProjectionQuery'
      responses:
        '200':
          description: AssetProjected array response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AssetProjected'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
    post:
      tags:
        - Asset
      summary: Create an Asset
      operationId: createAsset
      parameters:
        - $ref: '#/components/parameters/AssetProjectionQuery'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetCreateOrReplace'
      responses:
        '201':
          description: AssetProjected response
          content:
            application/json:
              schema:
               $ref: '#/components/schemas/AssetProjected'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientErrorBadAssetPost'
      security:
        - oauth:
            - 'stig-manager:collection'
    patch:
      tags:
        - Asset
      summary: Delete one or more Assets
      operationId: patchAssets
      parameters:
        - $ref: '#/components/parameters/CollectionIdQuery'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetsPatchRequest'
      responses:
        '200':
          description: AssetsPatch response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetsPatchResponse'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
  '/assets/{assetId}':
    parameters:
      - $ref: '#/components/parameters/AssetIdPath'
      - $ref: '#/components/parameters/AssetProjectionQuery'
    get:
      tags:
        - Asset
      summary: Return an Asset
      operationId: getAsset
      responses:
        '200':
          description: AssetProjected response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetProjected'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
    patch:
      tags:
        - Asset
      summary: Merge provided properties with an Asset
      operationId: updateAsset
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetUpdate'
      responses:
        '200':
          description: AssetProjected response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetProjected'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
    put:
      tags:
        - Asset
      summary: Set all properties of an Asset
      operationId: replaceAsset
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetCreateOrReplace'
      responses:
        '200':
          description: AssetProjected response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetProjected'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
    delete:
      tags:
        - Asset
      summary: Delete an Asset
      operationId: deleteAsset
      responses:
        '200':
          description: AssetProjected response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetProjected'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
  '/assets/{assetId}/checklists':
    parameters:
      - $ref: '#/components/parameters/AssetIdPath'
      - $ref: '#/components/parameters/BenchmarkIdArrayQuery'
      - name: format
        in: query
        description: The format of the response.
        schema:
          type: string
          default: ckl
          enum:
            - ckl
            - cklb
    get:
      tags:
        - Asset
      summary: Return a multi-STIG CKL for an Asset and its mapped STIGs
      operationId: getChecklistByAsset
      responses:
        '200':
          description: Review response
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/ChecklistCkl'
            application/json:
              schema:
                $ref: '#/components/schemas/ChecklistCklb'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
  '/assets/{assetId}/checklists/{benchmarkId}/{revisionStr}':
    parameters:
      - $ref: '#/components/parameters/AssetIdPath'
      - $ref: '#/components/parameters/BenchmarkIdPath'
      - $ref: '#/components/parameters/RevisionStrPath'
    get:
      tags:
        - Asset
      summary: Return JSON summary, or CKL(B) file, or XCCDF file for an Asset and STIG
      operationId: getChecklistByAssetStig
      parameters:
        - name: format
          in: query
          description: The format of the response.
          schema:
            type: string
            default: json
            enum:
              - json
              - json-access
              - ckl
              - cklb
              - xccdf
        - name: projection
          in: query
          description: Additional fields to include in JSON checklist responses.
          schema:
            type: array
            items:
              type: string
              enum:
                - rule
                - detail
                - comment
          style: form
          explode: true
      responses:
        '200':
          description: A JSON array of Checklist summary items or a CKL
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ChecklistAssetStig'
                  - $ref: '#/components/schemas/ChecklistJsonAccess'
                  - $ref: '#/components/schemas/ChecklistCklb'
            application/xml:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ChecklistCkl'
                  - $ref: '#/components/schemas/ChecklistXccdf'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
  '/assets/{assetId}/metadata':
    parameters:
      - $ref: '#/components/parameters/AssetIdPath'
    get:
      tags:
        - Asset
      summary: Return the metadata for Asset
      operationId: getAssetMetadata
      responses:
        '200':
          description: Metadata response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Metadata'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
    patch:
      tags:
        - Asset
      summary: Merge the provided object to a Assetmetadata
      operationId: patchAssetMetadata
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Metadata'
      responses:
        '200':
          description: Metadata response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Metadata'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
    put:
      tags:
        - Asset
      summary: Set a Asset metadata to the provided object
      operationId: putAssetMetadata
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Metadata'
      responses:
        '200':
          description: Metadata response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Metadata'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
  '/assets/{assetId}/metadata/keys':
    parameters:
      - $ref: '#/components/parameters/AssetIdPath'
    get:
      tags:
        - Asset
      summary: Return the keys of the provided Asset's metadata
      operationId: getAssetMetadataKeys
      responses:
        '200':
          description: MetadataKeys response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MetadataKey'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
  '/assets/{assetId}/metadata/keys/{key}':
    parameters:
      - $ref: '#/components/parameters/AssetIdPath'
      - $ref: '#/components/parameters/MetadataKeyPath'
    get:
      tags:
        - Asset
      summary: Return the value of the provided Asset metadata key
      operationId: getAssetMetadataValue
      responses:
        '200':
          description: MetadataValue response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetadataValue'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
    put:
      tags:
        - Asset
      summary: Set the value of the provided Asset metadata key to the provided string
      operationId: putAssetMetadataValue
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetadataValue'
      responses:
        '204':
          description: Empty to avoid large response after putting key with large value
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
    delete:
      tags:
        - Asset
      summary: Remove the provided Asset metadata key
      operationId: deleteAssetMetadataKey
      responses:
        '204':
          description: Empty to avoid large response after deleting key with large value
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
  '/assets/{assetId}/stigs':
    parameters:
      - $ref: '#/components/parameters/AssetIdPath'
    get:
      tags:
        - Asset
      summary: Return an Asset's STIG assignments
      operationId: getStigsByAsset
      responses:
        '200':
          description: STIG array response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AssetStigResponse'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
    # put:
    #   tags:
    #     - Asset
    #   summary: UNIMPLEMENTED Set all the STIG assignments of an Asset
    #   operationId: attachStigsToAsset
    #   requestBody:
    #     required: true
    #     content:
    #       application/json:
    #         schema:
    #           type: array
    #           minItems: 1
    #           items:
    #             type: string
    #   responses:
    #     '200':
    #       description: Asset response
    #       content:
    #         application/json:
    #           schema:
    #             $ref: '#/components/schemas/Asset'
    #     default:
    #       description: unexpected error
    #       content:
    #         application/json:
    #           schema:
    #             $ref: '#/components/schemas/Error'
    #   security:
    #     - oauth:
    #         - 'stig-manager:collection'
    delete:
      tags:
        - Asset
      summary: Delete all STIG assignments to an Asset
      operationId: removeStigsFromAsset
      responses:
        '200':
          description: STIG array response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/STIG'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
  '/assets/{assetId}/stigs/{benchmarkId}':
    parameters:
      - $ref: '#/components/parameters/AssetIdPath'
      - $ref: '#/components/parameters/BenchmarkIdPath'
    put:
      tags:
        - Asset
      summary: Assign a STIG to an Asset
      operationId: attachStigToAsset
      responses:
        '200':
          description: STIG array response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AssetStigResponse'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
    delete:
      tags:
        - Asset
      summary: Delete a STIG assignment to an Asset
      operationId: removeStigFromAsset
      responses:
        '200':
          description: STIG array response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AssetStigResponse'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
  /collections:
    parameters:
      - $ref: '#/components/parameters/ElevateQuery'
    get:
      tags:
        - Collection
      summary: Return a list of Collections accessible to the requester
      description: ''
      operationId: getCollections
      parameters:
        - $ref: '#/components/parameters/NameQuery'
        - $ref: '#/components/parameters/NameMatchQuery'
        - $ref: '#/components/parameters/MetadataQuery'
        - $ref: '#/components/parameters/CollectionsProjectionQuery'
      responses:
        '200':
          description: CollectionsProjected response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CollectionsProjected'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
    post:
      tags:
        - Collection
      summary: Create a Collection
      description: |
        The `settings` property is optional and can be partially provided.
        - If `settings` is not provided, the Collection will be created with the default settings.

        The default settings are:
        ```
         {
            fields: {
              detail: {
                enabled: 'always',
                required: 'always'
              },
              comment: {
                enabled: 'findings',
                required: 'findings'
              }
            },
            status: {
              canAccept: true,
              resetCriteria: 'result',
              minAcceptGrant: 3
            },
            history: {
              maxReviews: 5
            }
            importOptions: {
              autoStatus: 'saved',
              unreviewed: 'commented',
              unreviewedCommented: 'informational',
              emptyDetail: 'replace',
              emptyComment: 'ignore',
              updateAssetProps: false,
              allowCustom: true
            }
        ```
      operationId: createCollection
      parameters:
        - $ref: '#/components/parameters/CollectionProjectionQuery'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CollectionCreateOrReplace'
      responses:
        '201':
          description: CollectionProjected response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionProjected'
        '400':
          description: Client Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientErrorDuplicateCollection'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
  '/collections/{collectionId}':
    parameters:
      - $ref: '#/components/parameters/ElevateQuery'
      - $ref: '#/components/parameters/CollectionIdPath'
      - $ref: '#/components/parameters/CollectionProjectionQuery'
    get:
      tags:
        - Collection
      summary: Return a Collection
      description: ''
      operationId: getCollection
      responses:
        '200':
          description: CollectionProjected response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionProjected'
        '204':
          description: No Content
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
    patch:
      tags:
        - Collection
      summary: Merge provided properties with a Collection
      operationId: updateCollection
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CollectionUpdate'
      responses:
        '200':
          description: CollectionProjected response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionProjected'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
    put:
      tags:
        - Collection
      summary: Set all properties of a Collection
      description: |
        See the description of path `POST /collections` for notes about the `settings` property
      operationId: replaceCollection
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CollectionCreateOrReplace'
      responses:
        '200':
          description: CollectionProjected response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionProjected'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
    delete:
      tags:
        - Collection
      summary: Delete a Collection
      operationId: deleteCollection
      responses:
        '200':
          description: CollectionProjected response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionProjected'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
  '/collections/{collectionId}/archive/ckl':
    post:
      tags:
        - Collection
      summary: Return a ZIP archive containing CKL files for the supplied Assets and STIGs
      operationId: postCklArchiveByCollection
      parameters:
        - $ref: '#/components/parameters/CollectionIdPath'
        - $ref: '#/components/parameters/CklModeQuery'
      requestBody:
        required: true
        description: An array of '#/components/schemas/AssetStigSelection'.
        content:
          application/json:
            schema:
              type: array
              minItems: 1
              uniqueItems: true
              items:
                $ref: '#/components/schemas/AssetStigSelection'
      responses:
        '200':
          description: ZIP file stream
          content:
            application/zip:
              schema:
                type: string
                format: binary
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'

  '/collections/{collectionId}/archive/cklb':
    post:
      tags:
        - Collection
      summary: Return a ZIP archive containing CKLB files for the supplied Assets and STIGs
      operationId: postCklbArchiveByCollection
      parameters:
        - $ref: '#/components/parameters/CollectionIdPath'
        - $ref: '#/components/parameters/CklModeQuery'
      requestBody:
        required: true
        description: An array of '#/components/schemas/AssetStigSelection'.
        content:
          application/json:
            schema:
              type: array
              minItems: 1
              uniqueItems: true
              items:
                $ref: '#/components/schemas/AssetStigSelection'
      responses:
        '200':
          description: ZIP file stream
          content:
            application/zip:
              schema:
                type: string
                format: binary
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
  '/collections/{collectionId}/assets':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
    post:
      tags:
        - Asset
        - Collection
      summary: Create Multiple Assets
      operationId: createAssets
      parameters:
        - $ref: '#/components/parameters/CollectionIdPath'
        - $ref: '#/components/parameters/AssetProjectionQuery'
        - $ref: '#/components/parameters/DryRunQuery'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetCreateBatch'
      responses:
        '200':
          description: Dry Run Failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientErrorBadAssetPost'
        '201':
          description: Array of AssetProjected responses
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AssetProjected'
        '204':
          description: Dry run successful. Validation passed, but no data was persisted.
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
  '/collections/{collectionId}/archive/xccdf':
    post:
      tags:
        - Collection
      summary: Return a ZIP archive containing XCCDF results for the supplied Assets and STIGs
      operationId: postXccdfArchiveByCollection
      parameters:
        - $ref: '#/components/parameters/CollectionIdPath'
      requestBody:
        required: true
        description: An array of '#/components/schemas/AssetStigSelection'.
        content:
          application/json:
            schema:
              type: array
              minItems: 1
              items:
                $ref: '#/components/schemas/AssetStigSelection'
      responses:
        '200':
          description: ZIP file stream
          content:
            application/zip:
              schema:
                type: string
                format: binary
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
  '/collections/{collectionId}/checklists/{benchmarkId}/{revisionStr}':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
      - $ref: '#/components/parameters/BenchmarkIdPath'
      - $ref: '#/components/parameters/RevisionStrPath'
    get:
      tags:
        - Collection
      summary: Return the Checklist for the supplied Collection and STIG
      operationId: getChecklistByCollectionStig
      responses:
        '200':
          description: ChecklistCollectionStig response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ChecklistCollectionStig'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
  '/collections/{collectionId}/clone':
    post:
      tags:
        - Collection
      summary: Clone an existing Collection to a new Collection
      description: |
        Cloning large Collections can take several minutes! Users may see a performance impact when accessing the source Collection during this time.<br><br>Making changes to the source Collection while it is being cloned may lead to inconsistent results in the cloned Collection.<br><br><b>Before proceeding, it is recommended you warn Users that they refrain from modifying components of the source Collection while the cloning process is underway.</b>
      operationId: cloneCollection
      parameters:
        - $ref: '#/components/parameters/CollectionIdPath'
        - $ref: '#/components/parameters/CollectionProjectionQuery'
      requestBody:
        required: true
        description: CollectionClone request body
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CollectionCloneRequest'
      responses:
        '200':
          description: See the description for '#/components/schemas/CollectionCloneResponse'
          content:
            application/x-ndjson:
              schema:
                $ref: '#/components/schemas/CollectionCloneResponse'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
  '/collections/{collectionId}/export-to/{dstCollectionId}':
    post:
      tags:
        - Collection
      summary: Export reviews from a source Collection to a destination Collection
      description: |
        Exports reviews (result, detail and comment) from a `srcCollection` to a `dstCollection`, creating Assets in `dstCollection` if they do not exist. The `status` property of existing reviews in `dstCollection` are reset, if necessary, in accordance with the Collection settings.
      operationId: exportToCollection
      parameters:
        - $ref: '#/components/parameters/CollectionIdPath'
        - $ref: '#/components/parameters/DstCollectionIdPath'
      requestBody:
        required: true
        description: An array of '#/components/schemas/AssetStigSelection'. <b>The number of array items must conform to the minItems/maxItems properties</b>
        content:
          application/json:
            schema:
              type: array
              minItems: 1
              maxItems: 100
              uniqueItems: true
              items:
                $ref: '#/components/schemas/AssetStigSelection'
      responses:
        '200':
          description: See the description for '#/components/schemas/CollectionExportToResponse'
          content:
            application/x-ndjson:
              schema:
                $ref: '#/components/schemas/CollectionExportToResponse'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
  '/collections/{collectionId}/findings':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
      - $ref: '#/components/parameters/FindingAggregatorQuery'
      - name: acceptedOnly
        in: query
        schema:
          type: boolean
          default: false
      - $ref: '#/components/parameters/BenchmarkIdQuery'
      - $ref: '#/components/parameters/AssetIdQuery'
      - $ref: '#/components/parameters/LabelIdQuery'
      - $ref: '#/components/parameters/LabelNameQuery'
      - $ref: '#/components/parameters/LabelMatchQuery'
      - $ref: '#/components/parameters/FindingProjectionQuery'
    get:
      tags:
        - Collection
      summary: Return the Findings for the specified Collection
      operationId: getFindingsByCollection
      responses:
        '200':
          description: CollectionFinding response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FindingProjected'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'

  '/collections/{collectionId}/grants':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
      - $ref: '#/components/parameters/ElevateQuery'
    get:
      tags:
        - Collection
      summary: Return all collection grants
      operationId: getGrantsByCollection
      responses:
        '200':
          description: Collection Grant array response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Grant'     
        '403':
          $ref: '#/components/responses/Forbidden'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
    post:
      tags:
        - Collection
      summary: Add Grants to a Collection
      operationId: postGrantsByCollection
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/GrantPost' 
      responses:
        '201':
          description: Collection grant array response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Grant'      
        '403':
          $ref: '#/components/responses/Forbidden'  
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
  
  '/collections/{collectionId}/grants/{grantId}':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
      - $ref: '#/components/parameters/GrantIdPath'
      - $ref: '#/components/parameters/ElevateQuery'
    get:
      tags:
        - Collection
      summary: Return a collection grant by grantId
      operationId: getGrantByCollectionGrant
      responses:
        '200':
          description: Collection StigAssetBasic array response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Grant'     
        '403':
          $ref: '#/components/responses/Forbidden'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
    put:
      tags:
        - Collection
      summary: Replace the properties of a Collection Grant by grantId.
      operationId: putGrantByCollectionGrant
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/UserGrant'
                - $ref: '#/components/schemas/UserGroupGrant'
      responses:
        '200':
          description: Collection grant array response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Grant'     
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
    delete:
      tags:
        - Collection
      operationId: deleteGrantByCollectionGrant
      responses:
        '200':
          description: UserGrantEffective response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Grant'
        '403':
          $ref: '#/components/responses/Forbidden'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
  '/collections/{collectionId}/grants/{grantId}/acl':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
      - $ref: '#/components/parameters/GrantIdPath'
    get:
      tags:
        - Collection
      summary: Return the Access Control List for the specified Collection Grant.
      operationId: getAclRulesByCollectionGrant
      responses:
        '200':
          description: Collection AclRuleAssetBasic array response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AclForGrant'
        '403':
          $ref: '#/components/responses/Forbidden'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
    put:
      tags:
        - Collection
      summary: Set the Access Control List for the specified Collection Grant.
      operationId: putAclRulesByCollectionGrant
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/AclRulePut'
      responses:
        '200':
          description: AclRuleAssetBasic array response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AclForGrant'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'      
  '/collections/{collectionId}/reviews':
    get:
      tags:
        - Review
      summary: Return a list of Reviews accessible to the requester
      description: ''
      operationId: getReviewsByCollection
      parameters:
        - $ref: '#/components/parameters/CollectionIdPath'
        - $ref: '#/components/parameters/ReviewRulesQuery'
        - $ref: '#/components/parameters/ReviewResultQuery'
        - $ref: '#/components/parameters/ReviewStatusQuery'
        - $ref: '#/components/parameters/RuleIdQuery'
        - $ref: '#/components/parameters/GroupIdQuery'
        - $ref: '#/components/parameters/CciQuery'
        - $ref: '#/components/parameters/UserIdQuery'
        - $ref: '#/components/parameters/AssetIdQuery'
        - $ref: '#/components/parameters/BenchmarkIdQuery'
        - $ref: '#/components/parameters/LabelIdQuery'
        - $ref: '#/components/parameters/LabelNameQuery'
        - $ref: '#/components/parameters/LabelMatchQuery'
        - $ref: '#/components/parameters/MetadataQuery'
        - $ref: '#/components/parameters/ReviewsProjectionQuery'
      responses:
        '200':
          description: Review response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ReviewRead'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
    post:
      tags:
        - Review
      summary: Insert, update, or merge a complete or partial Review to multiple Assets and Rules
      description: |

        Applies a complete or partial Review to multiple target Asset/Rule pairs. Depending on the Review properties supplied, new Reviews may be created, existing Reviews may be updated, or both operations may occur (similar to an SQL merge).

        ## Caution

        **It is possible to send a request which will place the database under considerable load and take many seconds (or minutes) to complete. To determine if a request affects a large set of Reviews, clients are strongly encouraged to send a "preflight" request with the `dryRun` option enabled.**

        ## Request Validation

        The overall request is validated as follows:

        - conformance with the OAS schema for `ReviewBatch`
        - the requesting user has been granted access to the {collectionId}

        ## Request body

        **source** *(required)*

          The Review source is applied to the product of `assets` x `rules` (see below). It MUST contain at least one of the properties `result`, `detail`, `comment`, `resultEngine`, `metadata` or `status`.
        - Multiple properties can be specified.
        - a string value for the `status` property is normalized to `{ label: <string>, text: null }`


        **assets** *(required)*

        The target Assets, which are specified as either:
          - an array of `assetId`
          - an array of `benchmarkId` where target Assets are calculated as the list of distinct Assets assigned at least one of the given STIGs, taking into account the requesting User's collection grant.

        **rules** *(required)*

        The target Rules, which are specified as either:
          - an array of `ruleId`
          - an array of `benchmarkId` where target Rules are calculated as the list of distinct Rules from all available revisions of the given STIGs.

        **action** *(optional)*

        Constrains the data action to be taken. If present, the value MUST be one of `insert`, `update`, or `merge`.

          - `insert`: only create new Reviews, do not update existing Reviews
          - `update`: only update existing Reviews, do not create new Reviews
          - `merge`: create new Reviews and update existing Reviews

        If not present, the default value is:
          
          - `merge` if the source Review includes `result`
          - `update` if the source Review does not include `result`   

        New Reviews cannot be created when `source` does not include `result`. In that case, specifying either the `insert` or `merge` value is an error. 

        **updateFilters** *(optional)*

        Limits the Reviews to be updated, based on an array of filtering objects. If present, updates are applied to Reviews from the product `assets` x `rules` that pass each of the filters (filters are combined with logical AND). If not present, updates are applied to each Review from the product `assets` x `rules`. 

        Filtering objects specify a Review `field` , a `condition`, and a `value`. See the schema definition for further details. 

        **dryRun** *(optional)*

        If present with a `true` value, performs all processing and validation logic without actually changing any data. Useful to verify what a given request would do and to reveal any validation errors. The default value is `false`.

        ## Review candidates

        Candidate Reviews are created by cross joining the source Review with the product of `assets` x `rules` and applying the resulting rows to existing Reviews (if any) in accordance with the Collection settings.

        **For updated Reviews** 

        In general, an absent source Review property will retain existing values except as below.

        - an absent `status` property will either retain the existing value or update the `status` value to `{ label: "saved", text: "Review change triggered status update" }`, in accordance with the Collection `settings.status.resetCriteria`.
        - an absent `resultEngine` property will either retain the existing value or update the `resultEngine` value to `null`. If applying the source Review changes an existing `result`, the `resultEngine` value will be set to `null`.

        **For new Reviews**

        - an absent `detail` or `comment` property will set the candidate value to the empty string.
        - an absent `status` property will set the candidate value to `{ label: "saved", text: null }`.
        - an absent `resultEngine` property will set the candidate value to `null`.
        - an absent `metadata` property will set the candidate value to `{}`

        ## Candidate validation

        Each candidate Review is permitted or rejected as follows:

        - If the requesting user's collection grant is `restricted` AND the `ruleId` is not included in any version of any `benchmarkId` for which the requesting user been granted access, then **reject** the Review.
        - If `status.label` has value `saved`, then permit the Review.
        - If the Review would not be submittable according to the Collection settings, then **reject** the Review
        - If the value of `status.label` is `submitted`, then **permit** the Review.
        - If the value of `status.label` is `accepted` or `rejected` AND the Collection settings allow Reviews to be Accepted or Rejected, then **permit** the Review.
        - If `status.label` has value `accepted` or `rejected` AND the Collection settings prohibit Reviews from being Accepted or Rejected, then **reject** the Review.

      operationId: postReviewBatch
      parameters:
        - $ref: '#/components/parameters/CollectionIdPath'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReviewBatch'
      responses:
        '200':
          description: ReviewBatchResponse response
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ReviewBatchResponse'
                  - $ref: '#/components/schemas/ReviewBatchResponseDryRun'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
  '/collections/{collectionId}/reviews/{assetId}':
    get:
      tags:
        - Review
      summary: Return a list of Reviews for an Asset
      operationId: getReviewsByAsset
      parameters:
        - $ref: '#/components/parameters/CollectionIdPath'
        - $ref: '#/components/parameters/AssetIdPath'
        - $ref: '#/components/parameters/ReviewRulesQuery'
        - $ref: '#/components/parameters/ReviewResultQuery'
        - $ref: '#/components/parameters/ReviewStatusQuery'
        - $ref: '#/components/parameters/BenchmarkIdQuery'
        - $ref: '#/components/parameters/MetadataQuery'
        - $ref: '#/components/parameters/ReviewsProjectionQuery'
      responses:
        '200':
          description: ReviewAssetProjected response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ReviewAsset'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
    post:
      tags:
        - Review
      summary: Post one or more Reviews
      description: |
        The request body is an array that can contain both new and updated Reviews. All Reviews MUST contain the properties `ruleId`, `result`, `detail`, and `comment`. The overall request is validated as follows:

        - conformance with the OAS schema for `ReviewAssetPost`
        - the requesting user has been granted access to the {collectionId}

        **For all Reviews**

        - a string value for the `status` property will set the stored value to `{ label: <string>, text: null }`
        - an absent `resultEngine` property will set the stored value to `null`

        **For updated Reviews** 

        - a `null` value for either `detail` or `comment` will retain the existing value.
        - an absent `status` property will either retain the existing value or update the `status` value to `{ label: "saved", text: "Review change triggered status update" }`, in accordance with the Collection `settings.status.resetCriteria`.

        **For new Reviews**

        - a `null` value for either `detail` or `comment` will set the stored value to the empty string.
        - an absent `status` property will set the stored value to `{ label: "saved", text: null }`.

        **Each new or updated Review is permitted or rejected as follows:**

        - If the requesting user's collection grant is `restricted` AND the `ruleId` is not included in any version of any `benchmarkId` for which the requesting user been granted access, then **reject** the Review
        - If the optional property `status` is absent or `status.label` has value `saved`, then permit the Review
        - If the new or updated Review would not be submittable according to the Collection settings, then **reject** the Review
        - If the value of `status.label` is `submitted`, then **permit** the Review.
        - If the value of `status.label` is `accepted` or `rejected` AND the Collection settings allow Reviews to be Accepted or Rejected, then **permit** the Review.
        - If `status.label` has value `accepted` or `rejected` AND the Collection settings prohibit Reviews from being Accepted or Rejected, then **reject** the Review.
      operationId: postReviewsByAsset
      parameters:
        - $ref: '#/components/parameters/CollectionIdPath'
        - $ref: '#/components/parameters/AssetIdPath'
      requestBody:
        content:
          application/json:
            schema:
              type: array
              minItems: 1
              items:
                $ref: '#/components/schemas/ReviewAssetPost'
      responses:
        '200':
          description: ReviewPostResponse response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReviewPostResponse'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
  '/collections/{collectionId}/reviews/{assetId}/{ruleId}':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
      - $ref: '#/components/parameters/AssetIdPath'
      - $ref: '#/components/parameters/RuleIdPath'
      - $ref: '#/components/parameters/ReviewProjectionQuery'
    get:
      tags:
        - Review
      summary: Return the Review for an Asset and Rule
      operationId: getReviewByAssetRule
      responses:
        '200':
          description: ReviewAssetRuleRead response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReviewAssetRuleRead'
        '204':
          description: The requested resource has no content.
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
    patch:
      tags:
        - Review
      summary: Merge the provided properties with an existing Review
      description: |
        The request MUST target an existing Review and the request body MUST contain one or more Review properties. The overall request is validated as follows:

        - the request body conforms with the OAS schema for `ReviewAssetRulePatch`
        - a request body that includes `resultEngine` must also include `result`
        - the requesting user has been granted access to the {collectionId}
        - a Review already exists for the {assetId} and {ruleId}

        A string value for the `status` property will set the stored value to `{ label: <string>, text: null }`.
        If the request includes a `result`, then the `resultEngine` value will be set to `null` unless the request includes an explicit `resultEngine` value. 

        An absent `status` property may still lead to the `status` value being updated to `{ label: "saved", text: "Review change triggered status update" }`, in accordance with the Collection `settings.status.resetCriteria`.

        Unlike the corresponding PUT endpoint, the `detail` and `comment` properties do not support `null` as a value.

        The request is permitted or rejected as follows:

        - If the requesting user's collection grant is `restricted` AND the `assetId` is not included in any user grant, then **reject** the Review
        - If the requesting user's collection grant is `restricted` AND the `ruleId` is not included in any version of any `benchmarkId` for which the user been granted access, then **reject** the Review
        - If the new or updated Review would not be submittable according to the Collection settings, then **reject** the Review
        - If the value of `status.label` is `submitted`, then **permit** the Review.
        - If the value of `status.label` is `accepted` or `rejected` AND the Collection settings allow Reviews to be Accepted or Rejected, then **permit** the Review.
        - If `status.label` has value `accepted` or `rejected` AND the Collection settings prohibit Reviews from being Accepted or Rejected, then **reject** the Review.
      operationId: patchReviewByAssetRule
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReviewAssetRulePatch'
      responses:
        '200':
          description: ReviewProjected response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReviewAssetRuleRead'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
    put:
      tags:
        - Review
      summary: Set all properties of a Review
      description: |
        The request can target either a new or an existing Review. The request body MUST contain the Review properties `result`, `detail`, and `comment`. The overall request is validated as follows:

        - conformance with the OAS schema for `ReviewAssetRulePut`
        - the requesting user has been granted access to the {collectionId}

        **For all Reviews**

        - a string value for the `status` property will set the stored value to `{ label: <string>, text: null }`
        - an absent `resultEngine` property will set the stored value to `resultEngine: null`

        **For updated Reviews** 

        - a `null` value for either `detail` or `comment` will retain the existing value.
        - an absent `status` property will either retain or update the `status` value to `{ label: "saved", text: "Review change triggered status update" }`, in accordance with the Collection `settings.status.resetCriteria`.

        **For new Reviews**

        - a `null` value for either `detail` or `comment` will set the stored value to the empty string.
        - an absent `status` property will set the stored value to `{ label: "saved", text: null }`.

        The request is permitted or rejected as follows:

        - If the requesting user's collection grant is `restricted` AND the `assetId` is not included in any user grant, then **reject** the Review
        - If the requesting user's collection grant is `restricted` AND the `ruleId` is not included in any version of any `benchmarkId` for which the user been granted access, then **reject** the Review
        - If the new or updated Review would not be submittable according to the Collection settings, then **reject** the Review
        - If the value of `status.label` is `submitted`, then **permit** the Review.
        - If the value of `status.label` is `accepted` or `rejected` AND the Collection settings allow Reviews to be Accepted or Rejected, then **permit** the Review.
        - If `status.label` has value `accepted` or `rejected` AND the Collection settings prohibit Reviews from being Accepted or Rejected, then **reject** the Review.
      operationId: putReviewByAssetRule
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReviewAssetRulePut'
      responses:
        '200':
          description: ReviewProjected response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReviewAssetRuleRead'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
    delete:
      tags:
        - Review
      summary: Delete a Review
      operationId: deleteReviewByAssetRule
      # parameters:
      responses:
        '200':
          description: ReviewProjected response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReviewAssetRuleRead'
        '204':
          description: No Content
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
  '/collections/{collectionId}/reviews/{assetId}/{ruleId}/metadata':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
      - $ref: '#/components/parameters/AssetIdPath'
      - $ref: '#/components/parameters/RuleIdPath'
    get:
      tags:
        - Review
      summary: Return the metadata for Review
      operationId: getReviewMetadata
      responses:
        '200':
          description: Metadata response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Metadata'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
    patch:
      tags:
        - Review
      summary: Merge the provided object to a Review metadata
      operationId: patchReviewMetadata
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Metadata'
      responses:
        '200':
          description: Metadata response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Metadata'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
    put:
      tags:
        - Review
      summary: Set a Review metadata to the provided object
      operationId: putReviewMetadata
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Metadata'
      responses:
        '200':
          description: Metadata response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Metadata'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
  '/collections/{collectionId}/reviews/{assetId}/{ruleId}/metadata/keys':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
      - $ref: '#/components/parameters/AssetIdPath'
      - $ref: '#/components/parameters/RuleIdPath'
    get:
      tags:
        - Review
      summary: Return the keys of the provided Review's metadata
      operationId: getReviewMetadataKeys
      responses:
        '200':
          description: MetadataKeys response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MetadataKey'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
  '/collections/{collectionId}/reviews/{assetId}/{ruleId}/metadata/keys/{key}':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
      - $ref: '#/components/parameters/AssetIdPath'
      - $ref: '#/components/parameters/RuleIdPath'
      - $ref: '#/components/parameters/MetadataKeyPath'
    get:
      tags:
        - Review
      summary: Return the value of the provided Review metadata key
      operationId: getReviewMetadataValue
      responses:
        '200':
          description: MetadataValue response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetadataValue'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
    put:
      tags:
        - Review
      summary: Set the value of the provided Review metadata key to the provided string
      operationId: putReviewMetadataValue
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetadataValue'
      responses:
        '204':
          description: Empty to avoid large response after putting key with large value
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
    delete:
      tags:
        - Review
      summary: Remove the provided Review metadata key
      operationId: deleteReviewMetadataKey
      responses:
        '204':
          description: Empty to avoid large response after deleting key with large value
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
  '/collections/{collectionId}/labels':
    get:
      tags:
        - Collection
      summary: Return labels of the specified Collection
      operationId: getCollectionLabels
      parameters:
        - $ref: '#/components/parameters/CollectionIdPath'
      responses:
        200:
          description: Labels response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Label'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
    post:
      tags:
        - Collection
      summary: Create a label in the specified Collection
      operationId: createCollectionLabel
      parameters:
        - $ref: '#/components/parameters/CollectionIdPath'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LabelCreate'
      responses:
        201:
          description: Label response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Label'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
  '/collections/{collectionId}/labels/batch':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
    post:
      tags:
        - Collection
      summary: Create multiple labels in the specified Collection
      operationId: createCollectionLabels
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              minItems: 1
              items:
                $ref: '#/components/schemas/LabelCreate'
      responses:
        201:
          description: Labels response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Label'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
  '/collections/{collectionId}/labels/{labelId}':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
      - $ref: '#/components/parameters/LabelIdPath'
    get:
      tags:
        - Collection
      summary: Return the specified Label of the specified Collection
      operationId: getCollectionLabelById
      responses:
        200:
          description: Labels response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Label'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
    patch:
      tags:
        - Collection
      summary: Update an existing Label
      operationId: patchCollectionLabelById
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LabelUpdate'
      responses:
        '200':
          description: Label response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Label'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
    delete:
      tags:
        - Collection
      summary: Delete a Label
      operationId: deleteCollectionLabelById
      responses:
        '204':
          description: No Content
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
  '/collections/{collectionId}/labels/{labelId}/assets':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
      - $ref: '#/components/parameters/LabelIdPath'
    get:
      tags:
        - Collection
        - Asset
      summary: Return the Assets mapped to the Label
      operationId: getAssetsByCollectionLabelId
      responses:
        '200':
          description: Asset response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AssetBasic'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
    put:
      tags:
        - Collection
        - Asset
      summary: Replace the Label's Asset mappings
      operationId: putAssetsByCollectionLabelId
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/String255'
      responses:
        '200':
          description: The Label's Asset mappings
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AssetBasic'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
  '/collections/{collectionId}/metadata':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
    get:
      tags:
        - Collection
      summary: Return the metadata for Collection
      operationId: getCollectionMetadata
      responses:
        '200':
          description: Metadata response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Metadata'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
    patch:
      tags:
        - Collection
      summary: Merge the provided object to a Collection metadata
      operationId: patchCollectionMetadata
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Metadata'
      responses:
        '200':
          description: Metadata response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Metadata'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
    put:
      tags:
        - Collection
      summary: Set a Collection metadata to the provided object
      operationId: putCollectionMetadata
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Metadata'
      responses:
        '200':
          description: Metadata response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Metadata'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
  '/collections/{collectionId}/metadata/keys':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
    get:
      tags:
        - Collection
      summary: Return the keys of the provided Collection metadata
      operationId: getCollectionMetadataKeys
      responses:
        '200':
          description: MetadataKeys response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MetadataKey'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
  '/collections/{collectionId}/metadata/keys/{key}':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
      - $ref: '#/components/parameters/MetadataKeyPath'
    get:
      tags:
        - Collection
      summary: Return the value of the provided Collection metadata key
      operationId: getCollectionMetadataValue
      responses:
        '200':
          description: MetadataValue response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetadataValue'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
    put:
      tags:
        - Collection
      summary: Set the value of the provided Collection metadata key to the provided string
      operationId: putCollectionMetadataValue
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetadataValue'
      responses:
        '204':
          description: Empty to avoid large response after putting key with large value
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
    delete:
      tags:
        - Collection
      summary: Remove the provided Collection metadata key
      operationId: deleteCollectionMetadataKey
      responses:
        '204':
          description: Empty to avoid large response after deleting key with large value
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
  '/collections/{collectionId}/metrics/detail':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
      - $ref: '#/components/parameters/BenchmarkIdArrayQuery'
      - $ref: '#/components/parameters/AssetIdArrayQuery'
      - $ref: '#/components/parameters/LabelIdQuery'
      - $ref: '#/components/parameters/LabelNameQuery'
      - $ref: '#/components/parameters/LabelMatchQuery'
      - $ref: '#/components/parameters/MetricsFormatQuery'
    get:
      tags:
        - Metrics
      summary: Return unaggregated Asset/STIG metrics for the specified Collection
      operationId: getMetricsDetailByCollection
      responses:
        '200':
          description: Metrics response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MetricsDetailUnagg'
            text/csv:
              schema:
                type: string
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
  '/collections/{collectionId}/metrics/detail/asset':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
      - $ref: '#/components/parameters/BenchmarkIdArrayQuery'
      - $ref: '#/components/parameters/AssetIdArrayQuery'
      - $ref: '#/components/parameters/LabelIdQuery'
      - $ref: '#/components/parameters/LabelNameQuery'
      - $ref: '#/components/parameters/LabelMatchQuery'
      - $ref: '#/components/parameters/MetricsFormatQuery'
    get:
      tags:
        - Metrics
      summary: Return metrics for the specified Collection aggregated by Asset
      operationId: getMetricsDetailByCollectionAggAsset
      responses:
        '200':
          description: Metrics response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MetricsDetailAggAsset'
            text/csv:
              schema:
                type: string
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
  '/collections/{collectionId}/metrics/detail/collection':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
      - $ref: '#/components/parameters/BenchmarkIdArrayQuery'
      - $ref: '#/components/parameters/AssetIdArrayQuery'
      - $ref: '#/components/parameters/LabelIdQuery'
      - $ref: '#/components/parameters/LabelNameQuery'
      - $ref: '#/components/parameters/LabelMatchQuery'
      - $ref: '#/components/parameters/MetricsFormatQuery'
    get:
      tags:
        - Metrics
      summary: Return aggregated metrics for the specified Collection
      operationId: getMetricsDetailByCollectionAgg
      responses:
        '200':
          description: Metrics response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsDetailAggCollection'
            text/csv:
              schema:
                type: string
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
  '/collections/{collectionId}/metrics/detail/label':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
      - $ref: '#/components/parameters/BenchmarkIdArrayQuery'
      - $ref: '#/components/parameters/AssetIdArrayQuery'
      - $ref: '#/components/parameters/LabelIdQuery'
      - $ref: '#/components/parameters/LabelNameQuery'
      - $ref: '#/components/parameters/LabelMatchQuery'
      - $ref: '#/components/parameters/MetricsFormatQuery'
    get:
      tags:
        - Metrics
      summary: Return metrics for the specified Collection aggregated by Label
      operationId: getMetricsDetailByCollectionAggLabel
      responses:
        '200':
          description: Metrics response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MetricsDetailAggLabel'
            text/csv:
              schema:
                type: string
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
  '/collections/{collectionId}/metrics/detail/stig':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
      - $ref: '#/components/parameters/BenchmarkIdArrayQuery'
      - $ref: '#/components/parameters/AssetIdArrayQuery'
      - $ref: '#/components/parameters/LabelIdQuery'
      - $ref: '#/components/parameters/LabelNameQuery'
      - $ref: '#/components/parameters/LabelMatchQuery'
      - $ref: '#/components/parameters/MetricsFormatQuery'
    get:
      tags:
        - Metrics
      summary: Return metrics for the specified Collection aggregated by STIG
      operationId: getMetricsDetailByCollectionAggStig
      responses:
        '200':
          description: Metrics response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MetricsDetailAggStig'
            text/csv:
              schema:
                type: string
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'

  '/collections/{collectionId}/metrics/summary':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
      - $ref: '#/components/parameters/BenchmarkIdArrayQuery'
      - $ref: '#/components/parameters/AssetIdArrayQuery'
      - $ref: '#/components/parameters/LabelIdQuery'
      - $ref: '#/components/parameters/LabelNameQuery'
      - $ref: '#/components/parameters/LabelMatchQuery'
      - $ref: '#/components/parameters/MetricsFormatQuery'
    get:
      tags:
        - Metrics
      summary: Return unaggregated Asset/STIG metrics for the specified Collection
      operationId: getMetricsSummaryByCollection
      responses:
        '200':
          description: Metrics response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MetricsSummaryUnagg'
            text/csv:
              schema:
                type: string
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
  '/collections/{collectionId}/metrics/summary/asset':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
      - $ref: '#/components/parameters/BenchmarkIdArrayQuery'
      - $ref: '#/components/parameters/AssetIdArrayQuery'
      - $ref: '#/components/parameters/LabelIdQuery'
      - $ref: '#/components/parameters/LabelNameQuery'
      - $ref: '#/components/parameters/LabelMatchQuery'
      - $ref: '#/components/parameters/MetricsFormatQuery'
    get:
      tags:
        - Metrics
      summary: Return metrics for the specified Collection aggregated by Asset
      operationId: getMetricsSummaryByCollectionAggAsset
      responses:
        '200':
          description: Metrics response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MetricsSummaryAggAsset'
            text/csv:
              schema:
                type: string
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
  '/collections/{collectionId}/metrics/summary/collection':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
      - $ref: '#/components/parameters/BenchmarkIdArrayQuery'
      - $ref: '#/components/parameters/AssetIdArrayQuery'
      - $ref: '#/components/parameters/LabelIdQuery'
      - $ref: '#/components/parameters/LabelNameQuery'
      - $ref: '#/components/parameters/LabelMatchQuery'
      - $ref: '#/components/parameters/MetricsFormatQuery'
    get:
      tags:
        - Metrics
      summary: Return aggregated metrics for the specified Collection
      operationId: getMetricsSummaryByCollectionAgg
      responses:
        '200':
          description: Metrics response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsSummaryAggCollection'
            text/csv:
              schema:
                type: string
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
  '/collections/{collectionId}/metrics/summary/label':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
      - $ref: '#/components/parameters/BenchmarkIdArrayQuery'
      - $ref: '#/components/parameters/AssetIdArrayQuery'
      - $ref: '#/components/parameters/LabelIdQuery'
      - $ref: '#/components/parameters/LabelNameQuery'
      - $ref: '#/components/parameters/LabelMatchQuery'
      - $ref: '#/components/parameters/MetricsFormatQuery'
    get:
      tags:
        - Metrics
      summary: Return metrics for the specified Collection aggregated by Label
      operationId: getMetricsSummaryByCollectionAggLabel
      responses:
        '200':
          description: Metrics response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MetricsSummaryAggLabel'
            text/csv:
              schema:
                type: string
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
  '/collections/{collectionId}/metrics/summary/stig':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
      - $ref: '#/components/parameters/BenchmarkIdArrayQuery'
      - $ref: '#/components/parameters/AssetIdArrayQuery'
      - $ref: '#/components/parameters/LabelIdQuery'
      - $ref: '#/components/parameters/LabelNameQuery'
      - $ref: '#/components/parameters/LabelMatchQuery'
      - $ref: '#/components/parameters/MetricsFormatQuery'
    get:
      tags:
        - Metrics
      summary: Return metrics for the specified Collection aggregated by STIG
      operationId: getMetricsSummaryByCollectionAggStig
      responses:
        '200':
          description: Metrics response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MetricsSummaryAggStig'
            text/csv:
              schema:
                type: string
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'

  '/collections/{collectionId}/poam':
    get:
      tags:
        - Collection
      summary: Return a POAM-like spreadsheet for the specified Collection aggregated by groupId
      operationId: getPoamByCollection
      parameters:
        - $ref: '#/components/parameters/CollectionIdPath'
        - $ref: '#/components/parameters/PoamAggregatorQuery'
        - name: acceptedOnly
          in: query
          schema:
            type: boolean
            default: false
        - $ref: '#/components/parameters/BenchmarkIdQuery'
        - $ref: '#/components/parameters/AssetIdQuery'
        - name: date
          description: Value for columns Scheduled Completion Date, Milestone With Completion Dates, Milestone Changes
          in: query
          schema:
            type: string
            pattern: '^(0[1-9]|1[0-2])/(0[1-9]|[12][0-9]|3[01])/\d{4}$'
        - name: office
          description: Value for column Office/Org
          in: query
          schema:
            type: string
            maxLength: 255
          allowReserved: true
        - name: status
          description: Value for column Status
          in: query
          schema:
            type: string
            maxLength: 255
          allowReserved: true
        - $ref: '#/components/parameters/PoamFormatQuery'
        - name: mccastPackageId
          description: Value for POAM MCCAST PackageId
          in: query
          schema:
            type: string
            maxLength: 255
          allowReserved: true
        - name: mccastAuthName
          description: Value for POAM MCCAST Authorization Name
          in: query
          schema:
            type: string
            maxLength: 255
          allowReserved: true
      responses:
        '200':
          description: CollectionFinding response
          content:
            application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
              schema:
                type: string
                format: binary
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
  '/collections/{collectionId}/review-history':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
    get:
      tags:
        - Collection
      summary: Return history records for the specified Collection that meet the specified criteria
      operationId: getReviewHistoryByCollection
      parameters:
        - $ref: '#/components/parameters/StartDateQuery' # Lower bound (earliest date) of returned history entry timestamps
        - $ref: '#/components/parameters/EndDateQuery' # Upper bound (latest date) of returned history entry timestamps
        - $ref: '#/components/parameters/AssetIdQuery' # return review history entries for just the specified assetId, if provided.
        - $ref: '#/components/parameters/RuleIdQuery' # return review history entries for just the specified RuleId, if provided.
        - $ref: '#/components/parameters/ReviewStatusQuery' # return review history entries with the specified status
      responses:
        '200':
          description: ReviewHistory response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ReviewHistoryAsset'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
    delete:
      tags:
        - Collection
      summary: Remove history records that meet specified criteria
      operationId: deleteReviewHistoryByCollection
      parameters:
        - $ref: '#/components/parameters/RetentionDateQuery' # Review History Entries older than this date will be deleted.
        - $ref: '#/components/parameters/AssetIdQuery' # Apply operation to just the specified assetId, if provided.
      responses:
        '200':
          description: Number of history records deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReviewHistoryDeleted'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
  '/collections/{collectionId}/review-history/stats':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
    get:
      tags:
        - Collection
      summary: Return history statistics for the specified Collection
      operationId: getReviewHistoryStatsByCollection
      parameters:
        - $ref: '#/components/parameters/StartDateQuery' # Lower bound (earliest date) of returned history entry count
        - $ref: '#/components/parameters/EndDateQuery' # Upper bound (latest date) of returned history entry count
        - $ref: '#/components/parameters/AssetIdQuery' # return review history stats for just the specified assetId, if provided.
        - $ref: '#/components/parameters/RuleIdQuery' # return review history stats for just the specified RuleId, if provided.
        - $ref: '#/components/parameters/ReviewStatusQuery' # return review history stats with the specified status
        - $ref: '#/components/parameters/ReviewHistoryStatsProjectionQuery'
      responses:
        '200':
          description: ReviewHistoryStats response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReviewHistoryStats'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
  '/collections/{collectionId}/stigs':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
      - $ref: '#/components/parameters/LabelIdQuery'
      - $ref: '#/components/parameters/LabelNameQuery'
      - $ref: '#/components/parameters/LabelMatchQuery'
      - $ref: '#/components/parameters/CollectionStigProjectionQuery'
    get:
      tags:
        - Collection
      summary: Return the STIGs mapped in the specified Collection
      operationId: getStigsByCollection
      responses:
        '200':
          description: Collection STIGs array response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CollectionStigWithAssetCount'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
  '/collections/{collectionId}/stigs/{benchmarkId}':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
      - $ref: '#/components/parameters/BenchmarkIdPath'
      - $ref: '#/components/parameters/CollectionStigProjectionQuery'
    get:
      tags:
        - Collection
      summary: Return the STIG mapped in the specified Collection
      operationId: getStigByCollection
      responses:
        '200':
          description: Collection STIGs array response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionStigWithAssetCount'
        '204':
          description: No content because STIG is not assigned
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
    post:
      tags:
        - Collection
      summary: Set the default Revision and/or the Asset list of a STIG in a Collection
      description: |
        Neither of the request body properties is required but at least one must be present. If the path parameter `{benchmarkId}` is not already mapped to at least one Asset in `{collectionId}`, then the `assetIds` property must be present.
      operationId: writeStigPropsByCollectionStig
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              minProperties: 1
              properties:
                defaultRevisionStr:
                  $ref: '#/components/schemas/RevisionStr'
                assetIds:
                  type: array
                  items:
                    $ref: '#/components/schemas/StringIntId'
      responses:
        '200':
          description: Default Revision response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionStigWithAssetCount'
        '204':
          description: No content because STIG is not assigned
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
  '/collections/{collectionId}/stigs/{benchmarkId}/assets':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
      - $ref: '#/components/parameters/BenchmarkIdPath'
    get:
      tags:
        - Asset
        - Collection
      summary: Get the Assets in a Collection attached to a STIG
      description: ''
      operationId: getAssetsByStig
      parameters:
        - $ref: '#/components/parameters/LabelIdQuery'
        - $ref: '#/components/parameters/LabelNameQuery'
        - $ref: '#/components/parameters/LabelMatchQuery'
      responses:
        '200':
          description: AssetBasicProjected response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AssetBasicProjected'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
    put:
      tags:
        - Asset
        - Collection
      summary: Set the Assets mapped to a STIG
      description: ''
      operationId: attachAssetsToStig
      requestBody:
        required: true
        description: A list of assetIds from the specified Collection
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
      responses:
        '200':
          description: AssetBasicProjected response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AssetBasicProjected'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
  '/collections/{collectionId}/tasks/review-aging/config':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
    get:
      tags:
        - Collection
      summary: Return the task config for a collection
      operationId: getCollectionTaskConfigReviewAging
      responses:
        '200':
          description: Task config response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReviewAgingConfig'
        '404':
          $ref: '#/components/responses/NotFound'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
    put:
      tags:
        - Collection
      summary: Set the task config for a collection
      operationId: putCollectionTaskConfigReviewAging
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReviewAgingConfigPut'
      responses:
        '200':
          description: Task config response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReviewAgingConfig'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
    delete:
      tags:
        - Collection
      summary: Delete the task config for a collection
      operationId: deleteCollectionTaskConfigReviewAging
      responses:
        '204':
          description: No Content
        '404':
          $ref: '#/components/responses/NotFound'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection'
  '/collections/{collectionId}/tasks/{taskName}/output':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
      - $ref: '#/components/parameters/TaskNamePath'
    get:
      tags:
        - Collection
      summary: Return task output for a collection
      operationId: getCollectionTaskOutput
      parameters:
        - name: start
          in: query
          description: ISO8601 lower bound for output timestamp (inclusive)
          schema:
            type: string
            format: date-time
        - name: end
          in: query
          description: ISO8601 upper bound for output timestamp (inclusive)
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: Task output array response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TaskOutputItem'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
  '/collections/{collectionId}/unreviewed/assets':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
      - $ref: '#/components/parameters/AssetIdQuery'
      - $ref: '#/components/parameters/LabelIdQuery'
      - $ref: '#/components/parameters/LabelNameQuery'
      - $ref: '#/components/parameters/BenchmarkIdQuery'
      - $ref: '#/components/parameters/RuleSeverityQuery'
      - $ref: '#/components/parameters/UnreviewedAssetsProjectionQuery'
    get:
      tags:
        - Collection
      summary: EXPERIMENTAL - Return the Assets in the specified Collection with unreviewed Rules
      operationId: getUnreviewedAssetsByCollection
      responses:
        '200':
          description: UnreviewedAsset response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UnreviewedAsset'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
  '/collections/{collectionId}/unreviewed/rules':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
      - $ref: '#/components/parameters/RuleIdQuery'
      - $ref: '#/components/parameters/LabelIdQuery'
      - $ref: '#/components/parameters/LabelNameQuery'
      - $ref: '#/components/parameters/BenchmarkIdQuery'
      - $ref: '#/components/parameters/RuleSeverityQuery'
      - $ref: '#/components/parameters/UnreviewedRulesProjectionQuery'
    get:
      tags:
        - Collection
      summary: EXPERIMENTAL - Return the Rules in the specified Collection with unreviewed Assets
      operationId: getUnreviewedRulesByCollection
      responses:
        '200':
          description: UnreviewedRules response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UnreviewedRule'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
  '/collections/{collectionId}/users/{userId}/effective-acl':
    parameters:
      - $ref: '#/components/parameters/CollectionIdPath'
      - $ref: '#/components/parameters/UserIdPath'
    get:
      tags:
        - Collection
      summary: Return a User's effective access rules for the specified Collection.
      operationId: getEffectiveAclByCollectionUser
      responses:
        '200':
          description: EffectiveAcl array response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EffectiveAcl'
        '403':
          $ref: '#/components/responses/Forbidden'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
  '/collections/meta/metrics/detail':
    parameters:
      - $ref: '#/components/parameters/CollectionIdArrayQuery'
      - $ref: '#/components/parameters/BenchmarkIdArrayQuery'
      - $ref: '#/components/parameters/MetricsFormatQuery'
    get:
      tags:
        - Metrics
      summary: Return fully aggregated meta-metrics
      operationId: getMetricsDetailByMeta
      responses:
        '200':
          description: Metrics response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsDetailAggMeta'
            text/csv:
              schema:
                type: string
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
  '/collections/meta/metrics/detail/collection':
    parameters:
      - $ref: '#/components/parameters/CollectionIdArrayQuery'
      - $ref: '#/components/parameters/BenchmarkIdArrayQuery'
      - $ref: '#/components/parameters/RevisionIdArrayQuery'
      - $ref: '#/components/parameters/MetricsFormatQuery'
    get:
      tags:
        - Metrics
      summary: Return meta-metrics aggregated by Collection
      operationId: getMetricsDetailByMetaAggCollection
      responses:
        '200':
          description: Metrics response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MetricsDetailAggCollection'
            text/csv:
              schema:
                type: string
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
  '/collections/meta/metrics/detail/stig':
    parameters:
      - $ref: '#/components/parameters/CollectionIdArrayQuery'
      - $ref: '#/components/parameters/BenchmarkIdArrayQuery'
      - $ref: '#/components/parameters/MetricsFormatQuery'
    get:
      tags:
        - Metrics
      summary: Return meta-metrics aggregated by STIG
      operationId: getMetricsDetailByMetaAggStig
      responses:
        '200':
          description: Metrics response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MetricsDetailAggStig'
            text/csv:
              schema:
                type: string
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
  '/collections/meta/metrics/summary':
    parameters:
      - $ref: '#/components/parameters/CollectionIdArrayQuery'
      - $ref: '#/components/parameters/BenchmarkIdArrayQuery'
      - $ref: '#/components/parameters/MetricsFormatQuery'
    get:
      tags:
        - Metrics
      summary: Return fully aggregated meta-metrics
      operationId: getMetricsSummaryByMeta
      responses:
        '200':
          description: Metrics response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsSummaryAggMeta'
            text/csv:
              schema:
                type: string
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
  '/collections/meta/metrics/summary/collection':
    parameters:
      - $ref: '#/components/parameters/CollectionIdArrayQuery'
      - $ref: '#/components/parameters/BenchmarkIdArrayQuery'
      - $ref: '#/components/parameters/RevisionIdArrayQuery'
      - $ref: '#/components/parameters/MetricsFormatQuery'
    get:
      tags:
        - Metrics
      summary: Return meta-metrics aggregated by Collection
      operationId: getMetricsSummaryByMetaAggCollection
      responses:
        '200':
          description: Metrics response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MetricsSummaryAggCollection'
            text/csv:
              schema:
                type: string
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
  '/collections/meta/metrics/summary/stig':
    parameters:
      - $ref: '#/components/parameters/CollectionIdArrayQuery'
      - $ref: '#/components/parameters/BenchmarkIdArrayQuery'
      - $ref: '#/components/parameters/MetricsFormatQuery'
    get:
      tags:
        - Metrics
      summary: Return meta-metrics aggregated by STIG
      operationId: getMetricsSummaryByMetaAggStig
      responses:
        '200':
          description: Metrics response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MetricsSummaryAggStig'
            text/csv:
              schema:
                type: string
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:collection:read'
  
  /jobs:
    get:
      summary: List jobs
      tags:
        - Job
      operationId: getJobs
      parameters:
        - $ref: '#/components/parameters/ElevateQuery'
      responses:
        '200':
          description: List of jobs
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Job'
        'default':
          description: error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - stig-manager:op:read
      x-elevation-required: true
    post:
      summary: Create a new job
      tags:
        - Job
      operationId: postJob
      parameters:
        - $ref: '#/components/parameters/ElevateQuery'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JobCreate'
      responses:
        '201':
          description: Job created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Job'
        'default':
          description: error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - stig-manager:op
      x-elevation-required: true
  /jobs/{jobId}:
    get:
      summary: Get job by ID
      tags:
        - Job
      operationId: getJob
      parameters:
        - $ref: '#/components/parameters/ElevateQuery'
        - $ref: '#/components/parameters/JobIdPath'
      responses:
        '200':
          description: Job details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Job'
        'default':
          description: Job not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - stig-manager:op:read
      x-elevation-required: true
    delete:
      summary: Delete job by ID
      tags:
        - Job
      operationId: deleteJob
      parameters:
        - $ref: '#/components/parameters/ElevateQuery'
        - $ref: '#/components/parameters/JobIdPath'
      responses:
        '204':
          description: Job deleted
        'default':
          description: error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - stig-manager:op
      x-elevation-required: true
    patch:
      summary: Update job by ID
      tags:
        - Job
      operationId: patchJob
      parameters:
        - $ref: '#/components/parameters/ElevateQuery'
        - $ref: '#/components/parameters/JobIdPath'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JobUpdate'
      responses:
        '200':
          description: Job updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Job'
        'default':
          description: error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - stig-manager:op
      x-elevation-required: true
  /jobs/{jobId}/runs:
    get:
      summary: List the job runs
      tags:
        - Job
      operationId: getRunsByJob
      parameters:
        - $ref: '#/components/parameters/ElevateQuery'
        - $ref: '#/components/parameters/JobIdPath'
      responses:
        '200':
          description: List of job runs
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/JobRun'
        'default':
          description: error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - stig-manager:op:read
      x-elevation-required: true
    post:
      summary: Start an immediate job run
      tags:
        - Job
      operationId: runImmediateJob
      parameters:
        - $ref: '#/components/parameters/ElevateQuery'
        - $ref: '#/components/parameters/JobIdPath'
      responses:
        '201':
          description: Job run created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobRunCreated'
        'default':
          description: error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - stig-manager:op
      x-elevation-required: true
  /jobs/runs/{runId}:
    get:
      summary: Get a job run by ID
      tags:
        - Job
      operationId: getRunById
      parameters:
        - $ref: '#/components/parameters/ElevateQuery'
        - $ref: '#/components/parameters/JobRunIdPath'
      responses:
        '200':
          description: Job run details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobRun'
        'default':
          description: error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - stig-manager:op:read
      x-elevation-required: true
    delete:
      summary: Delete a job run by ID
      tags:
        - Job
      operationId: deleteRunById
      parameters:
        - $ref: '#/components/parameters/ElevateQuery'
        - $ref: '#/components/parameters/JobRunIdPath'
      responses:
        '204':
          description: Job run deleted
        'default':
          description: error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - stig-manager:op
      x-elevation-required: true
  /jobs/runs/{runId}/output:
    get:
      summary: Get the output for a job run
      tags:
        - Job
      operationId: getOutputByRun
      parameters:
        - $ref: '#/components/parameters/ElevateQuery'
        - $ref: '#/components/parameters/JobRunIdPath'
        - $ref: '#/components/parameters/RunSequenceQuery'
      responses:
        '200':
          description: Job run output
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/JobRunOutput'
        'default':
          description: error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - stig-manager:op:read
      x-elevation-required: true
  /jobs/tasks:
    get:
      summary: List all tasks
      tags:
        - Job
      operationId: getAllTasks
      parameters:
        - $ref: '#/components/parameters/ElevateQuery'
        - name: hasCollectionConfig
          in: query
          description: Filter to tasks that support per-collection configuration
          schema:
            type: boolean
      responses:
        '200':
          description: List of tasks
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/JobTask'
        'default':
          description: error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - stig-manager:op:read
  /op/appdata:
    get:
      tags:
        - Operation
      summary: Export application data
      operationId: getAppData
      parameters:
        - $ref: '#/components/parameters/AppDataFormatQuery'
        - $ref: '#/components/parameters/ElevateQuery'
      responses:
        '200':
          description: Exported data
          content:
            application/jsonl:
              schema:
                type: string
            application/gzip:
              schema:
                type: string
                format: binary     
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - stig-manager:op:read
    post:
      tags:
        - Operation
      summary: Import and overwrite application data
      operationId: replaceAppData
      parameters:
        - $ref: '#/components/parameters/ElevateQuery'
      requestBody:
        required: false
        content:
          application/gzip:
            schema:
              type: string
              format: binary
          application/x-gzip:
            schema:
              type: string
              format: binary
          application/jsonl:
            schema:
              type: string
              format: binary
      responses:
        '200':
          description: Import successful
          content:
            application/jsonl:
              schema:
                type: string
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - stig-manager:op
  /op/appdata/tables:
    get:
      tags:
        - Operation
      summary: Get the name and data length of each table
      operationId: getAppDataTables
      parameters:
        - $ref: '#/components/parameters/ElevateQuery'
      responses:
        '200':
          description: An array of table names and lengths
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AppDataTable'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - stig-manager:op:read
  /op/appinfo:
    get:
      tags:
        - Operation
      summary: Return information about the application deployment
      operationId: getAppInfo
      parameters:
        - $ref: '#/components/parameters/ElevateQuery'
        - name: includeRowCounts
          in: query
          description: Include exact row counts for each table (slower) or use estimated counts (faster)
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: AppInfo response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppInfo'
      security:
        - oauth:
            - stig-manager:op:read
  /op/configuration:
    get:
      tags:
        - Operation
      summary: Return API version and configuration information
      operationId: getConfiguration
      security: []
      responses:
        '200':
          description: Configuration response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiConfiguration'
  /op/definition:
    get:
      tags:
        - Operation
      summary: Return the API definition
      operationId: getDefinition
      security: []
      parameters:
        - $ref: '#/components/parameters/JsonPathQuery'
      responses:
        '200':
          description: Definition response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiDefinition'
  /op/details:
    get:
      tags:
        - Operation
      summary: "DEPRECATED: replaced by /op/appinfo"
      operationId: getDetails
      parameters:
        - $ref: '#/components/parameters/ElevateQuery'
      responses:
        '200':
          description: Detail response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
      security:
        - oauth:
            - stig-manager:op:read
  
  
  /op/state:
    get:
      tags:
        - Operation
      summary: Return information about the API state
      operationId: getState
      responses:
        '200':
          description: Detail response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StateResponse'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /op/state/sse:
    get:
      tags:
      - Operation
      operationId: streamStateSse
      summary: Stream Server-Sent Events (SSE) about changes to the current API state
      description: >
        Opens a one-way stream using SSE.
        The response is a continuous stream of events in `text/event-stream` format.
      responses:
        '200':
          description: Stream of events
          content:
            text/event-stream:
              schema:
                type: string
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /stigs:
    get:
      tags:
        - STIG
      summary: Return a list of available STIGs
      operationId: getSTIGs
      parameters:
        - name: title
          in: query
          description: A string found anywhere in a STIG title
          schema:
            type: string
        - $ref: '#/components/parameters/StigProjectionQuery'
        - $ref: '#/components/parameters/ElevateQuery'
      responses:
        '200':
          description: STIG response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/STIG'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:stig:read'
    post:
      tags:
        - STIG
      summary: Import a STIG Benchmark
      operationId: importBenchmark
      parameters:
        - name: clobber
          in: query
          description: Should existing Revision data be overwritten
          schema:
            type: boolean
            default: false
        - $ref: '#/components/parameters/ElevateQuery'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                importFile:
                  type: string
                  format: binary
      responses:
        '200':
          description: The added STIG
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RevisionPost'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:stig'
  '/stigs/ccis/{cci}':
    get:
      tags:
        - STIG
      summary: Return data for the specified CCI
      operationId: getCci
      parameters:
        - $ref: '#/components/parameters/CciProjectionQuery'
        - name: cci
          in: path
          description: A path parameter that identifies a CCI
          required: true
          schema:
            pattern: ^[0-9]{6}$
            type: string
      responses:
        '200':
          description: CCI response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cci'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:stig:read'
  '/stigs/rules/{ruleId}':
    get:
      tags:
        - STIG
      summary: Return the definition and associated check and fix for the specified Rule
      description: |
        Note: A very small number of edge cases are known to exist where published STIGs have updated Rule Content without updating the associated RuleId. In these cases, it is possible this endpoint may return inconsistent Rule info. If you need specific Rule information for a given STIG Revision, use the `/stigs/{benchmarkId}/revisions/{revisionStr}/rules/{ruleId}` endpoint.
      operationId: getRuleByRuleId
      parameters:
        - $ref: '#/components/parameters/RuleProjectionQuery'
        - name: ruleId
          in: path
          description: A path parameter that identifies a Rule
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Rule response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuleProjected'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:stig:read'
  '/stigs/scap-maps':
    get:
      tags:
        - STIG
      summary: Return a list of SCAP benchmarkIds mapped to Manual benchmarkIds
      operationId: getScapMap
      responses:
        '200':
          description: SCAP Map response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SCAPMap'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:stig:read'
  '/stigs/{benchmarkId}':
    get:
      tags:
        - STIG
      summary: Return properties of the specified STIG
      operationId: getStigById
      parameters:
        - name: benchmarkId
          in: path
          description: A path parameter that identifies a STIG
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/ElevateQuery'
      responses:
        '200':
          description: STIG response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/STIG'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:stig:read'
    delete:
      tags:
        - STIG
      summary: Deletes a STIG (*** and all revisions ***)
      operationId: deleteStigById
      parameters:
        - name: benchmarkId
          in: path
          description: A path parameter that identifies a STIG
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/ElevateQuery'
        - $ref: '#/components/parameters/ForceQuery'
      responses:
        '200':
          description: The deleted STIG
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/STIG'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:stig'
      x-rbac:
        - admin
  '/stigs/{benchmarkId}/revisions':
    get:
      tags:
        - STIG
      summary: Return a list of revisions for the specified STIG
      operationId: getRevisionsByBenchmarkId
      parameters:
        - name: benchmarkId
          in: path
          description: A path parameter that identifies a STIG
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/ElevateQuery'
      responses:
        '200':
          description: Revision response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Revision'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:stig:read'
  '/stigs/{benchmarkId}/revisions/{revisionStr}':
    get:
      tags:
        - STIG
      summary: Return metadata for the specified revision of a STIG
      operationId: getRevisionByString
      parameters:
        - name: benchmarkId
          in: path
          description: A path parameter that identifies a STIG
          required: true
          schema:
            type: string
        - name: revisionStr
          in: path
          description: A path parameter that identifies a STIG revision [V{version_num}R{release_num} | 'latest' ]
          required: true
          schema:
            pattern: ^(V\d+R\d+(\.\d+)?|latest)$
            type: string
        - $ref: '#/components/parameters/ElevateQuery'
      responses:
        '200':
          description: Revision response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Revision'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:stig:read'
    delete:
      tags:
        - STIG
      summary: Deletes the specified revision of a STIG
      operationId: deleteRevisionByString
      parameters:
        - name: benchmarkId
          in: path
          description: A path parameter that identifies a STIG
          required: true
          schema:
            type: string
        - name: revisionStr
          in: path
          description: A path parameter that identifies a STIG revision [V{version_num}R{release_num} | 'latest' ]
          required: true
          schema:
            pattern: ^(V\d+R\d+(\.\d+)?)$
            type: string
        - $ref: '#/components/parameters/ElevateQuery'
        - $ref: '#/components/parameters/ForceQuery'
      responses:
        '200':
          description: The deleted Revision
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Revision'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:stig'
      x-rbac:
        - admin
  '/stigs/{benchmarkId}/revisions/{revisionStr}/ccis':
    get:
      tags:
        - STIG
      summary: Return a list of CCIs from a STIG revision
      operationId: getCcisByRevision
      parameters:
        - name: benchmarkId
          in: path
          description: A path parameter that identifies a STIG
          required: true
          schema:
            type: string
        - name: revisionStr
          in: path
          description: A path parameter that identifies a STIG revision [V{version_num}R{release_num} | 'latest' ]
          required: true
          schema:
            pattern: ^(V\d+R\d+(\.\d+)?|latest)$
            type: string
      responses:
        '200':
          description: CCI response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CciListItem'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:stig:read'
  '/stigs/{benchmarkId}/revisions/{revisionStr}/groups':
    get:
      tags:
        - STIG
      summary: Return the list of groups for the specified revision of a STIG.
      operationId: getGroupsByRevision
      parameters:
        - $ref: '#/components/parameters/GroupProjectionQuery'
        - name: benchmarkId
          in: path
          description: A path parameter that identifies a STIG
          required: true
          schema:
            type: string
        - name: revisionStr
          in: path
          description: A path parameter that identifies a STIG revision [V{version_num}R{release_num} | 'latest' ]
          required: true
          schema:
            pattern: ^(V\d+R\d+(\.\d+)?|latest)$
            type: string
      responses:
        '200':
          description: GroupProjected response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/GroupProjected'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:stig:read'
  '/stigs/{benchmarkId}/revisions/{revisionStr}/groups/{groupId}':
    get:
      tags:
        - STIG
      summary: Return the rules, checks and fixes for a Group from a specified revision of a STIG.
      description: None
      operationId: getGroupByRevision
      parameters:
        - $ref: '#/components/parameters/GroupProjectionQuery'
        - name: benchmarkId
          in: path
          description: A path parameter that identifies a STIG
          required: true
          schema:
            type: string
        - name: revisionStr
          in: path
          description: A path parameter that identifies a STIG revision [V{version_num}R{release_num} | 'latest' ]
          required: true
          schema:
            pattern: ^(V\d+R\d+(\.\d+)?|latest)$
            type: string
        - name: groupId
          in: path
          description: A path parameter that identifies a Group
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Group response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupProjected'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:stig:read'
  '/stigs/{benchmarkId}/revisions/{revisionStr}/rules':
    get:
      tags:
        - STIG
      summary: Return rule data for the specified revision of a STIG.
      operationId: getRulesByRevision
      parameters:
        - $ref: '#/components/parameters/RuleProjectionQuery'
        - name: benchmarkId
          in: path
          description: A path parameter that identifies a STIG
          required: true
          schema:
            type: string
        - name: revisionStr
          in: path
          description: A path parameter that identifies a STIG revision [V{version_num}R{release_num} | 'latest' ]
          required: true
          schema:
            pattern: ^(V\d+R\d+(\.\d+)?|latest)$
            type: string
      responses:
        '200':
          description: Rule response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RuleProjected'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:stig:read'
  '/stigs/{benchmarkId}/revisions/{revisionStr}/rules/{ruleId}':
    get:
      tags:
        - STIG
      summary: Return rule data for the specified Rule in a revision of a STIG.
      operationId: getRuleByRevision
      parameters:
        - $ref: '#/components/parameters/RuleProjectionQuery'
        - name: benchmarkId
          in: path
          description: A path parameter that identifies a STIG
          required: true
          schema:
            type: string
        - name: revisionStr
          in: path
          description: A path parameter that identifies a STIG revision [V{version_num}R{release_num} | 'latest' ]
          required: true
          schema:
            pattern: ^(V\d+R\d+(\.\d+)?|latest)$
            type: string
        - name: ruleId
          in: path
          description: A path parameter that identifies a Rule
          required: true
          schema:
            type: string
      responses:
        '200':
          description: RuleProjected response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuleProjected'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:stig:read'
  /user:
    parameters:
      - $ref: '#/components/parameters/UserPreferenceQuery'
    get:
      tags:
        - User
      summary: Return the requester's user information
      operationId: getUser
      responses:
        '200':
          description: User response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserProjected'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:user:read'
  /user/web-preferences:
    get:
      tags:
        - User
      summary: Return the requester's web-preferences
      operationId: getUserWebPreferences
      responses:
        '200':
          description: User Web Preferences response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebPreferences'
      security:
        - oauth:
            - 'stig-manager:user:read'
    patch:
      tags:
        - User
      summary: Merge the provided object to the requester's web-preferences
      operationId: patchUserWebPreferences
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebPreferencesPatch'
      responses:
        '200':
          description: User Web Preferences response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebPreferences'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
        # not semantically correct but needed for backwards compatability
            - 'stig-manager:user:read'
  /users:
    parameters:
      - $ref: '#/components/parameters/ElevateQuery'
      - $ref: '#/components/parameters/UserProjectionQuery'
    get:
      tags:
        - User
      summary: Return a list of Users accessible to the requester
      operationId: getUsers
      parameters:
        - $ref: '#/components/parameters/UsernameQuery'
        - $ref: '#/components/parameters/PrivilegeQuery'
        - $ref: '#/components/parameters/UsernameMatchQuery'
        - $ref: '#/components/parameters/UserStatusQuery'
      responses:
        '200':
          description: UserProjected array response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UserProjected'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:user:read'
    post:
      tags:
        - User
      summary: Create a User
      operationId: createUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserPost'
      responses:
        '201':
          description: UserProjected response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserProjected'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:user'
  '/users/{userId}':
    parameters:
      - $ref: '#/components/parameters/ElevateQuery'
      - $ref: '#/components/parameters/UserProjectionQuery'
      - $ref: '#/components/parameters/UserIdPath'
    get:
      tags:
        - User
      summary: Return a User
      operationId: getUserByUserId
      responses:
        '200':
          description: UserProjected response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserProjected'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:user:read'
    patch:
      tags:
        - User
      summary: Merge provided properties with a User
      operationId: updateUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserPatch'
      responses:
        '200':
          description: UserProjected response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserProjected'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:user'
    put:
      tags:
        - User
      summary: Set all properties of a User
      operationId: replaceUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserPut'
      responses:
        '200':
          description: UserProjected response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserProjected'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:user'
    delete:
      tags:
        - User
      summary: Delete a User that has never accessed the system.
      operationId: deleteUser
      responses:
        '200':
          description: UserProjected response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserProjected'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:user'
  /user-groups:
    post:
      tags:
        - User
      summary: Create a User Group
      operationId: createUserGroup
      parameters:
        - $ref: '#/components/parameters/ElevateQuery'
        - $ref: '#/components/parameters/UserGroupProjectionQuery'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserGroupPostOrPut'
      responses:
        '201':
          description: UserGroup response
          content:
            application/json:
              schema:
                  $ref: '#/components/schemas/UserGroupProjected'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:user'
    get:
      tags:
        - User
      summary: Get a list of User Groups accessible to the requester
      operationId: getUserGroups
      parameters:
        - $ref: '#/components/parameters/ElevateQuery'
        - $ref: '#/components/parameters/UserGroupProjectionQuery'
      responses:
        '200':
          description: UserGroups response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UserGroupProjected'
      security:
        - oauth:
            - 'stig-manager:user:read'
  '/user-groups/{userGroupId}':
    get:
      tags:
        - User
      summary: Return a User Group
      operationId: getUserGroup
      parameters:
        - $ref: '#/components/parameters/ElevateQuery'
        - $ref: '#/components/parameters/UserGroupIdPath'
        - $ref: '#/components/parameters/UserGroupProjectionQuery'
      responses:
        '200':
          description: UserGroup response
          content:
            application/json:
              schema:
                  $ref: '#/components/schemas/UserGroupProjected'
        'default':
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:user:read'
    patch: 
      tags:
        - User 
      summary: Patch a User Group
      operationId: patchUserGroup
      parameters:
        - $ref: '#/components/parameters/UserGroupIdPath'
        - $ref: '#/components/parameters/ElevateQuery'
        - $ref: '#/components/parameters/UserGroupProjectionQuery'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserGroupPatch'
      responses:
        '200':
          description: UserGroup response
          content:
            application/json:
              schema:
                  $ref: '#/components/schemas/UserGroupProjected'
        'default':
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:user'
    put: 
      tags:
        - User 
      summary: Replace a User Group
      operationId: putUserGroup
      parameters:
        - $ref: '#/components/parameters/UserGroupIdPath'
        - $ref: '#/components/parameters/ElevateQuery'
        - $ref: '#/components/parameters/UserGroupProjectionQuery'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserGroupPostOrPut'
      responses:
        '200':
          description: UserGroup response
          content:
            application/json:
              schema:
                  $ref: '#/components/schemas/UserGroupProjected'
        'default':
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:user'
    delete:
      tags:
        - User
      summary: Delete a User Group
      operationId: deleteUserGroup
      parameters:
        - $ref: '#/components/parameters/UserGroupIdPath'
        - $ref: '#/components/parameters/ElevateQuery'
        - $ref: '#/components/parameters/UserGroupProjectionQuery'
      responses:
        '200':
          description: UserGroup response
          content:
            application/json:
              schema:
                  $ref: '#/components/schemas/UserGroupProjected'
        'default':
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth:
            - 'stig-manager:user'
components:
  schemas:
    RoleId:
      maximum: 4
      minimum: 1
      type: integer
    AclForGrant:
      type: object
      properties:
        defaultAccess:
          $ref: '#/components/schemas/AclRuleAccess'
        acl:
          type: array
          items:
            $ref: '#/components/schemas/AclRuleBasic'
    AclRuleAccess:
      type: string
      enum:
        - none
        - r
        - rw
      default: rw
    AclRuleAssetBasic:
      additionalProperties: false
      type: object
      properties:
        asset:
          $ref: '#/components/schemas/AssetBasic'
        benchmarkId:
          $ref: '#/components/schemas/BenchmarkId'
        access:
          $ref: '#/components/schemas/AclRuleAccess'
      # required:
      #   - access
    AclRuleAssetPut:
      additionalProperties: false
      type: object
      properties:
        assetId:
          $ref: '#/components/schemas/AssetId'
        benchmarkId:
          $ref: '#/components/schemas/BenchmarkId'
        access:
          $ref: '#/components/schemas/AclRuleAccess'
      required:
        - access
    AclRuleBasic:
      anyOf:
       - $ref: '#/components/schemas/AclRuleAssetBasic'
       - $ref: '#/components/schemas/AclRuleLabel'
    AclRuleLabel:
      additionalProperties: false
      type: object
      properties:
        label:
          $ref: '#/components/schemas/LabelBasicWithColor'
        benchmarkId:
          $ref: '#/components/schemas/BenchmarkId'
        access:
          $ref: '#/components/schemas/AclRuleAccess'
      required:
        - access
    AclRuleLabelBasic:
      additionalProperties: false
      type: object
      properties:
        label:
          $ref: '#/components/schemas/LabelBasic'
        benchmarkId:
          $ref: '#/components/schemas/BenchmarkId'
        access:
          $ref: '#/components/schemas/AclRuleAccess'
      required:
        - access
    AclRuleLabelPut:
      additionalProperties: false
      type: object
      properties:
        labelId:
          $ref: '#/components/schemas/LabelId'
        benchmarkId:
          $ref: '#/components/schemas/BenchmarkId'
        access:
          $ref: '#/components/schemas/AclRuleAccess'
      required:
        - access
    AclRulePut:
      anyOf:
       - $ref: '#/components/schemas/AclRuleAssetPut'
       - $ref: '#/components/schemas/AclRuleLabelPut'
    AclSource:
      type: object
      properties:
        grantee:
          $ref: '#/components/schemas/Grantee'
        aclRule:
          anyOf:
            - $ref: '#/components/schemas/AclRuleAssetBasic'
            - $ref: '#/components/schemas/AclRuleLabelBasic'
    ApAcronym:
      $ref: '#/components/schemas/String20Nullable'
    ApiClassification:
      type: string
      enum:
        - NONE
        - U
        - FOUO
        - CUI
        - C
        - S
        - TS
        - SCI
    ApiConfiguration:
      additionalProperties: false
      type: object
      properties:
        classification:
          $ref: '#/components/schemas/ApiClassification'
        commit:
          $ref: '#/components/schemas/CommitObject'
        lastMigration:
          $ref: '#/components/schemas/LastMigration'
        version:
          $ref: '#/components/schemas/ApiVersion'
    ApiDefinition:
      oneOf:
        - type: object
        - type: array
    ApiVersion:
      $ref: '#/components/schemas/Version'
    AppDataFormat:
      type: string
      default: 'gzip'
      enum:
        - jsonl
        - gzip
    AppDataTable:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/String255'
        rows:
          type: number
        dataLength:
          type: number
    AppInfo:
      type: object
      properties:
        date:
          $ref: '#/components/schemas/StringDateTime'
        schema:
          $ref: '#/components/schemas/AppInfoSchemaVersion'
        version:
          $ref: '#/components/schemas/ApiVersion'
        collections:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/AppInfoCollection'
        requests:
          $ref: '#/components/schemas/AppInfoRequests'
        users:
          $ref: '#/components/schemas/AppInfoUsers'
        groups: 
          type: object
          additionalProperties:
            $ref: '#/components/schemas/AppInfoGroups'
        mysql:
          $ref: '#/components/schemas/AppInfoMySql'
        nodejs:
          $ref: '#/components/schemas/AppInfoNodejs'
      required:
        - date
        - schema
        - version
        - collections
        - requests
        - users
        - mysql
        - nodejs
    AppInfoGroups:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/String255'
        members:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        created:
          $ref: '#/components/schemas/Created'
        modifiedDate:
         $ref: '#/components/schemas/StringDateTime'
        roles:
          $ref: '#/components/schemas/AppInfoGroupsRoles'
      required:
        - name
        - members
        - created
        - modifiedDate
        - roles
    AppInfoGroupsRoles:
      type: object
      properties:
        full:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        owner:
         $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        manage:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        restricted:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
      required:
        - full
        - owner
        - manage
        - restricted
    AppInfoSchemaVersion:
      type: string
      pattern: "^[a-zA-Z0-9_-]+-appinfo-v[0-9]+\\.[0-9]+$"
    AppInfoNodejs:
      type: object
      properties:
        version:
          $ref: '#/components/schemas/ApiVersion'
        uptime:
          type: number
          format: double
        os:
          $ref: '#/components/schemas/AppInfoNodeOs'
        environment:
          additionalProperties:
            type: string
        memory:
          $ref: '#/components/schemas/AppInfoNodeMemory'
        cpus:
          type: array
          items:
            $ref: '#/components/schemas/AppInfoNodeCpus'
      required:
        - version
        - uptime
        - os
        - environment
        - memory
        - cpus
    AppInfoNodeOs:
      type: object
      properties:
        platform:
          $ref: '#/components/schemas/String255'
        arch:
          $ref: '#/components/schemas/String255'
        osMachine:
          $ref: '#/components/schemas/String255'
        osName:
          $ref: '#/components/schemas/String255'
        osRelease:
          $ref: '#/components/schemas/String255'
        loadAverage:
          $ref: '#/components/schemas/String255'
      required:
        - platform
        - arch
        - osMachine
        - osName
        - osRelease
        - loadAverage 
    AppInfoNodeCpus:
      type: object
      properties:
        model:
          $ref: '#/components/schemas/String255'
        speed:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
      required:
        - model
        - speed
    AppInfoNodeMemory: 
      type: object
      properties:
        rss:
          $ref: '#/components/schemas/Integer64MinimumZero'
        heapTotal:
          $ref: '#/components/schemas/Integer64MinimumZero'
        heapUsed:
          $ref: '#/components/schemas/Integer64MinimumZero'
        external:
          $ref: '#/components/schemas/Integer64MinimumZero'
        arrayBuffers:
          $ref: '#/components/schemas/Integer64MinimumZero'
        maxRss:
          $ref: '#/components/schemas/Integer64MinimumZero'
      required:
        - rss
        - heapTotal
        - heapUsed
        - external
        - arrayBuffers
        - maxRss
    AppInfoMySql:
      type: object
      properties:
        version:
          $ref: '#/components/schemas/ApiVersion'
        tables:
          $ref: '#/components/schemas/AppInfoMysqlTableStats'
        variables:
          $ref: '#/components/schemas/AppInfoMysqlVariables'
        status:
          $ref: '#/components/schemas/AppInfoMysqlStatus'
      required:
        - version
        - tables
        - variables
        - status
    AppInfoMysqlStatus:
      type: object
      properties:
        # Network
        Bytes_received:
          $ref: '#/components/schemas/String255'
        Bytes_sent:
          $ref: '#/components/schemas/String255'
        # Handler operations
        Handler_commit:
          $ref: '#/components/schemas/String255'
        Handler_update:
          $ref: '#/components/schemas/String255'
        Handler_write:
          $ref: '#/components/schemas/String255'
        # Buffer pool health - critical for performance monitoring
        Innodb_buffer_pool_bytes_data:
          $ref: '#/components/schemas/String255'
        Innodb_buffer_pool_pages_total:
          $ref: '#/components/schemas/String255'
        Innodb_buffer_pool_pages_free:
          $ref: '#/components/schemas/String255'
        Innodb_buffer_pool_pages_dirty:
          $ref: '#/components/schemas/String255'
        Innodb_buffer_pool_pages_flushed:
          $ref: '#/components/schemas/String255'
        Innodb_buffer_pool_read_requests:
          $ref: '#/components/schemas/String255'
        Innodb_buffer_pool_reads:
          $ref: '#/components/schemas/String255'
        Innodb_buffer_pool_wait_free:
          $ref: '#/components/schemas/String255'
        # Redo log / Checkpoint - detect checkpoint thrashing
        Innodb_redo_log_current_lsn:
          $ref: '#/components/schemas/String255'
        Innodb_redo_log_checkpoint_lsn:
          $ref: '#/components/schemas/String255'
        Innodb_redo_log_flushed_to_disk_lsn:
          $ref: '#/components/schemas/String255'
        Innodb_log_waits:
          $ref: '#/components/schemas/String255'
        Innodb_log_writes:
          $ref: '#/components/schemas/String255'
        Innodb_os_log_fsyncs:
          $ref: '#/components/schemas/String255'
        # I/O operations
        Innodb_data_reads:
          $ref: '#/components/schemas/String255'
        Innodb_data_writes:
          $ref: '#/components/schemas/String255'
        Innodb_data_fsyncs:
          $ref: '#/components/schemas/String255'
        Innodb_pages_read:
          $ref: '#/components/schemas/String255'
        Innodb_pages_written:
          $ref: '#/components/schemas/String255'
        Innodb_pages_created:
          $ref: '#/components/schemas/String255'
        # Row operations
        Innodb_rows_read:
          $ref: '#/components/schemas/String255'
        Innodb_rows_updated:
          $ref: '#/components/schemas/String255'
        Innodb_rows_inserted:
          $ref: '#/components/schemas/String255'
        Innodb_rows_deleted:
          $ref: '#/components/schemas/String255'
        # Row locking
        Innodb_row_lock_waits:
          $ref: '#/components/schemas/String255'
        Innodb_row_lock_current_waits:
          $ref: '#/components/schemas/String255'
        Innodb_row_lock_time:
          $ref: '#/components/schemas/String255'
        Innodb_row_lock_time_avg:
          $ref: '#/components/schemas/String255'
        Innodb_row_lock_time_max:
          $ref: '#/components/schemas/String255'
        # Temp tables
        Created_tmp_tables:
          $ref: '#/components/schemas/String255'
        Created_tmp_disk_tables:
          $ref: '#/components/schemas/String255'
        Created_tmp_files:
          $ref: '#/components/schemas/String255'
        # Table cache
        Open_tables:
          $ref: '#/components/schemas/String255'
        Opened_tables:
          $ref: '#/components/schemas/String255'
        Table_open_cache_hits:
          $ref: '#/components/schemas/String255'
        Table_open_cache_misses:
          $ref: '#/components/schemas/String255'
        Table_open_cache_overflows:
          $ref: '#/components/schemas/String255'
        # Connections/Threads
        Connections:
          $ref: '#/components/schemas/String255'
        Max_used_connections:
          $ref: '#/components/schemas/String255'
        Threads_connected:
          $ref: '#/components/schemas/String255'
        Threads_running:
          $ref: '#/components/schemas/String255'
        Threads_created:
          $ref: '#/components/schemas/String255'
        Threads_cached:
          $ref: '#/components/schemas/String255'
        Aborted_connects:
          $ref: '#/components/schemas/String255'
        Aborted_clients:
          $ref: '#/components/schemas/String255'
        # Queries
        Queries:
          $ref: '#/components/schemas/String255'
        Slow_queries:
          $ref: '#/components/schemas/String255'
        Select_scan:
          $ref: '#/components/schemas/String255'
        Select_full_join:
          $ref: '#/components/schemas/String255'
        Select_full_range_join:
          $ref: '#/components/schemas/String255'
        # Sorts
        Sort_merge_passes:
          $ref: '#/components/schemas/String255'
        Sort_scan:
          $ref: '#/components/schemas/String255'
        Sort_range:
          $ref: '#/components/schemas/String255'
        Sort_rows:
          $ref: '#/components/schemas/String255'
        # Table locks
        Table_locks_immediate:
          $ref: '#/components/schemas/String255'
        Table_locks_waited:
          $ref: '#/components/schemas/String255'
        # Server
        Uptime:
          $ref: '#/components/schemas/String255'
        Uptime_since_flush_status:
          $ref: '#/components/schemas/String255'
      required:
        # Network
        - Bytes_received
        - Bytes_sent
        # Handler operations
        - Handler_commit
        - Handler_update
        - Handler_write
        # Buffer pool health
        - Innodb_buffer_pool_bytes_data
        - Innodb_buffer_pool_pages_total
        - Innodb_buffer_pool_pages_free
        - Innodb_buffer_pool_pages_dirty
        - Innodb_buffer_pool_pages_flushed
        - Innodb_buffer_pool_read_requests
        - Innodb_buffer_pool_reads
        - Innodb_buffer_pool_wait_free
        # Redo log / Checkpoint
        # - Innodb_redo_log_current_lsn (MySQL 8.0.30+ only)
        # - Innodb_redo_log_checkpoint_lsn (MySQL 8.0.30+ only)
        # - Innodb_redo_log_flushed_to_disk_lsn (MySQL 8.0.30+ only)
        - Innodb_log_waits
        - Innodb_log_writes
        - Innodb_os_log_fsyncs
        # I/O operations
        - Innodb_data_reads
        - Innodb_data_writes
        - Innodb_data_fsyncs
        - Innodb_pages_read
        - Innodb_pages_written
        - Innodb_pages_created
        # Row operations
        - Innodb_rows_read
        - Innodb_rows_updated
        - Innodb_rows_inserted
        - Innodb_rows_deleted
        # Row locking
        - Innodb_row_lock_waits
        - Innodb_row_lock_current_waits
        - Innodb_row_lock_time
        - Innodb_row_lock_time_avg
        - Innodb_row_lock_time_max
        # Temp tables
        - Created_tmp_tables
        - Created_tmp_disk_tables
        - Created_tmp_files
        # Table cache
        - Open_tables
        - Opened_tables
        - Table_open_cache_hits
        - Table_open_cache_misses
        - Table_open_cache_overflows
        # Connections/Threads
        - Connections
        - Max_used_connections
        - Threads_connected
        - Threads_running
        - Threads_created
        - Threads_cached
        - Aborted_connects
        - Aborted_clients
        # Queries
        - Queries
        - Slow_queries
        - Select_scan
        - Select_full_join
        - Select_full_range_join
        # Sorts
        - Sort_merge_passes
        - Sort_scan
        - Sort_range
        - Sort_rows
        # Table locks
        - Table_locks_immediate
        - Table_locks_waited
        # Server
        - Uptime
        - Uptime_since_flush_status
    AppInfoMysqlVariables:
      type: object
      properties:
        # InnoDB Buffer Pool - critical for memory and caching
        innodb_buffer_pool_size:
          $ref: '#/components/schemas/String255'
        innodb_buffer_pool_instances:
          $ref: '#/components/schemas/String255'
        # InnoDB Logging
        innodb_log_buffer_size:
          $ref: '#/components/schemas/String255'
        innodb_log_file_size:
          $ref: '#/components/schemas/String255'
        innodb_redo_log_capacity:
          $ref: '#/components/schemas/String255'
        # InnoDB I/O and Flushing
        innodb_io_capacity:
          $ref: '#/components/schemas/String255'
        innodb_io_capacity_max:
          $ref: '#/components/schemas/String255'
        innodb_flush_sync:
          $ref: '#/components/schemas/String255'
        innodb_flush_log_at_trx_commit:
          $ref: '#/components/schemas/String255'
        innodb_doublewrite:
          $ref: '#/components/schemas/String255'
        # InnoDB Locking and Buffering
        innodb_lock_wait_timeout:
          $ref: '#/components/schemas/String255'
        innodb_change_buffering:
          $ref: '#/components/schemas/String255'
        # Temporary Tables
        tmp_table_size:
          $ref: '#/components/schemas/String255'
        max_heap_table_size:
          $ref: '#/components/schemas/String255'
        temptable_max_mmap:
          $ref: '#/components/schemas/String255'
        temptable_max_ram:
          $ref: '#/components/schemas/String255'
        # Memory Buffers
        key_buffer_size:
          $ref: '#/components/schemas/String255'
        sort_buffer_size:
          $ref: '#/components/schemas/String255'
        read_buffer_size:
          $ref: '#/components/schemas/String255'
        read_rnd_buffer_size:
          $ref: '#/components/schemas/String255'
        join_buffer_size:
          $ref: '#/components/schemas/String255'
        binlog_cache_size:
          $ref: '#/components/schemas/String255'
        # Connection and Table Cache
        max_connections:
          $ref: '#/components/schemas/String255'
        max_allowed_packet:
          $ref: '#/components/schemas/String255'
        thread_cache_size:
          $ref: '#/components/schemas/String255'
        table_open_cache:
          $ref: '#/components/schemas/String255'
        table_definition_cache:
          $ref: '#/components/schemas/String255'
        # Server Version and Query Performance
        version:
          $ref: '#/components/schemas/Version'
        version_compile_machine:
          $ref: '#/components/schemas/String255'
        version_compile_os:
          $ref: '#/components/schemas/String255'
        long_query_time:
          $ref: '#/components/schemas/String255'
      required:
        # InnoDB Buffer Pool
        - innodb_buffer_pool_size
        - innodb_buffer_pool_instances
        # InnoDB Logging
        - innodb_log_buffer_size
        - innodb_log_file_size
        # - innodb_redo_log_capacity  (8.0.30+ only)
        # InnoDB I/O and Flushing
        - innodb_io_capacity
        - innodb_io_capacity_max
        - innodb_flush_sync
        - innodb_flush_log_at_trx_commit
        - innodb_doublewrite
        # InnoDB Locking and Buffering
        - innodb_lock_wait_timeout
        - innodb_change_buffering
        # Temporary Tables
        - tmp_table_size
        - max_heap_table_size
        - temptable_max_mmap
        - temptable_max_ram
        # Memory Buffers
        - key_buffer_size
        - sort_buffer_size
        - read_buffer_size
        - read_rnd_buffer_size
        - join_buffer_size
        - binlog_cache_size
        # Connection and Table Cache
        - max_connections
        - max_allowed_packet
        - thread_cache_size
        - table_open_cache
        - table_definition_cache
        # Server Version and Query Performance
        - version
        - version_compile_machine
        - version_compile_os
        - long_query_time
    AppInfoMysqlTableStats:
      type: object
      additionalProperties:
        $ref: '#/components/schemas/AppInfoTableInfo'
    AppInfoTableInfo:
      type: object
      properties:
        tableRows:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        tableCollation:
          $ref: '#/components/schemas/String255'
        avgRowLength:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        dataLength:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        indexLength:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        autoIncrement:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        createTime:
          $ref: '#/components/schemas/Created'
        updateTime:
          $ref: '#/components/schemas/StringDateTimeNullable'
        rowCount:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
      required:
        - tableRows
        - tableCollation
        - avgRowLength
        - dataLength
        - indexLength
        - autoIncrement
        - createTime
        - rowCount
    AppInfoUsers:
      type: object
      properties:
        userInfo:
          additionalProperties:
            $ref: '#/components/schemas/AppInfoUserInfo'
        userPrivilegeCounts:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/AppInfoUserPrivilegeCounts'
      required:
        - userInfo
        - userPrivilegeCounts
    AppInfoUserPrivilegeCounts:
      type: object
      properties:
        overall:
            $ref: '#/components/schemas/AppInfoPrivilegeTimeSeriesCounts'
        activeInLast30Days:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/AppInfoPrivilegeTimeSeriesCounts'
        activeInLast90Days:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/AppInfoPrivilegeTimeSeriesCounts'
    AppInfoPrivilegeTimeSeriesCounts:
      type: object
      additionalProperties:
        $ref: '#/components/schemas/IntegerMinimumZeroNullable'
    AppInfoUserInfo:
      type: object
      properties:
        username:
          $ref: '#/components/schemas/Username'
        created:
          $ref: '#/components/schemas/Created'
        lastAccess:
          $ref: '#/components/schemas/UserLastAccess'
        privileges:
          $ref: '#/components/schemas/AppInfoUserPrivileges'
        roles:
          $ref: '#/components/schemas/AppInfoUserRoles'
      required: 
        - username
        - created
        - lastAccess
        - privileges
        - roles
    AppInfoUserRoles:
      type: object
      properties:
        full:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        owner:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        manage:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        restricted:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
      required:
        - full
        - owner
        - manage
        - restricted
    AppInfoUserPrivileges:
      type: array
      items:
        $ref: '#/components/schemas/String255'
    AppInfoRequests:
      type: object
      properties:
        totalRequests:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        totalApiRequests:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        totalRequestDuration:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        operationIds:
          additionalProperties:
            $ref: '#/components/schemas/AppInfoOperation'
      required:
        - totalRequests
        - totalApiRequests
        - totalRequestDuration
        - operationIds
    AppInfoOperation:
      type: object
      properties:
        totalRequests:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        totalDuration:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        elevatedRequests:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        minDuration:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        maxDuration:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        maxDurationUpdates:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        retried:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        averageRetries:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        totalResLength:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        minResLength:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        maxResLength:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        totalReqLength:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        minReqLength:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        maxReqLength:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        projections:
          $ref: '#/components/schemas/AppInfoOperationIdProjections'
        clients:
          $ref: '#/components/schemas/AppInfoClients'
        users:
          $ref: '#/components/schemas/AppInfoUserRequests'
        errors:
          type: object
          additionalProperties:
            type: integer
            format: int64
            minimum: 0
      required:
        - totalRequests
        - totalDuration
        - elevatedRequests
        - minDuration
        - maxDuration
        - maxDurationUpdates
        - retried
        - averageRetries
        - totalResLength
        - minResLength
        - maxResLength
        - clients
        - users
        - errors
    AppInfoClients:
      type: object 
      additionalProperties:
        $ref: '#/components/schemas/IntegerMinimumZeroNullable'
    AppInfoUserRequests:
      type: object
      additionalProperties:
        $ref: '#/components/schemas/IntegerMinimumZeroNullable'
    AppInfoOperationIdProjections:
      type: object
      additionalProperties:
        $ref: '#/components/schemas/AppInfoOperationIdProjection'
    AppInfoOperationIdProjection:
      type: object
      properties:
        statusStats:
          type: object
          properties:
            totalRequests:
              $ref: '#/components/schemas/IntegerMinimumZeroNullable'
            minDuration:
              $ref: '#/components/schemas/IntegerMinimumZeroNullable'
            maxDuration:
              $ref: '#/components/schemas/IntegerMinimumZeroNullable'
            totalDuration:
              $ref: '#/components/schemas/IntegerMinimumZeroNullable'
            retried:
              $ref: '#/components/schemas/IntegerMinimumZeroNullable'
            averageRetries:
              $ref: '#/components/schemas/IntegerMinimumZeroNullable'
            averageDuration:
              $ref: '#/components/schemas/IntegerMinimumZeroNullable'
          required:
            - totalRequests
            - minDuration
            - maxDuration
            - totalDuration
            - retried
            - averageRetries
            - averageDuration
    AppInfoCollection:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/CollectionName'
        state:
          $ref: '#/components/schemas/AppInfoCollectionState'
        settings:
          $ref: '#/components/schemas/CollectionSettings'
        assets:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        assetsDisabled:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        uniqueStigs:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        stigAssignments:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        rules:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        reviews:
          $ref: '#/components/schemas/Integer64MinimumZeroNullable'
        reviewsDisabled:
          $ref: '#/components/schemas/Integer64MinimumZeroNullable'
        assetStigRanges:
          $ref: '#/components/schemas/AppInfoAssetStigRanges'
        grants:
          $ref: '#/components/schemas/AppInfoCollectionGrants'
        roleCounts:
          $ref: '#/components/schemas/AppInfoCollectionRoleCounts'
        labelCounts:
          $ref: '#/components/schemas/AppInfoLabelCounts'
      required:
        - name
        - state
        - settings
        - assets
        - assetsDisabled
        - uniqueStigs
        - stigAssignments
        - rules
        - reviews
        - reviewsDisabled
        - assetStigRanges
        - grants
        - roleCounts
        - labelCounts
    AppInfoCollectionRoleCounts:
      type: object
      properties:
        restricted:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        full:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        manage:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        owner:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
      required:
        - restricted
        - full
        - manage
        - owner
    AppInfoCollectionGrants:
      type: object
      additionalProperties:
        $ref: '#/components/schemas/AppInfoCollectionGrant'
    AppInfoCollectionGrant:
      type: object
      properties:
        role:
          $ref: '#/components/schemas/Roles'
        grantee:
          $ref: '#/components/schemas/AppInfoGrantee'
        ruleCounts:
          $ref: '#/components/schemas/AppInfoRuleCounts'
        uniqueStigs:
          type: integer
          format: int64
          minimum: 0
        uniqueAssets:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        uniqueStigsDisabled:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        uniqueAssetsDisabled:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
      required:
        - role
        - grantee
        - ruleCounts
        - uniqueStigs
        - uniqueAssets
        - uniqueStigsDisabled
        - uniqueAssetsDisabled
    AppInfoGrantee:
      type: object
      properties:
        userId:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        userGroupId:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
      required:
        - userId
        - userGroupId
    AppInfoRuleCounts:
      type: object
      properties:
        r:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        rw:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        none:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
      required:
        - r
        - rw
        - none
    AppInfoCollectionSettings:
      type: object
      additionalProperties: false
      properties:
        fields:
          $ref: '#/components/schemas/CollectionFieldSettings'
        status:
          $ref: '#/components/schemas/CollectionStatusSettings'
        history:
          $ref: '#/components/schemas/CollectionHistorySettings'
        importOptions:
          $ref: '#/components/schemas/CollectionImportOptions'          
    AppInfoCollectionState:
      type: string
      enum:
        - enabled
        - disabled
    AppInfoLabelCounts:
      type: object
      properties:
        collectionLabels:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        labeledAssets:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        assetLabels:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
      required: 
        - collectionLabels
        - labeledAssets
        - assetLabels
    AppInfoGrantCounts:
      type: object
      properties:
        role1:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        role2:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        role3:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        role4:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
    AppInfoRestrictedUsers:
      type: object
      properties:
        uniqueAssets:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        stigAsstCount:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
    AppInfoAssetStigRanges:
      type: object
      properties:
        range00:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        range01to05:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        range06to10:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        range11to15:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
        range16plus:
          $ref: '#/components/schemas/IntegerMinimumZeroNullable'
      required:
        - range00
        - range01to05
        - range06to10
        - range11to15
        - range16plus
    Asset:
      additionalProperties: false
      type: object
      properties:
        assetId:
          $ref: '#/components/schemas/AssetId'
        collection:
          $ref: '#/components/schemas/CollectionBasic'
        description:
          $ref: '#/components/schemas/AssetDescription'
        fqdn:
          $ref: '#/components/schemas/AssetFqdn'
        ip:
          $ref: '#/components/schemas/AssetIp'
        labelIds:
          type: array
          items:
            $ref: '#/components/schemas/LabelId' 
        mac:
          $ref: '#/components/schemas/AssetMac'
        metadata:
          $ref: '#/components/schemas/Metadata'
        name:
          $ref: '#/components/schemas/AssetName'
        noncomputing:
          $ref: '#/components/schemas/AssetNoncomputing'
      required:
        - assetId
        - name
        - fqdn
        - collection
        - description
        - ip
        - mac
        - noncomputing
    AssetBasic:
      additionalProperties: false
      type: object
      properties:
        assetId:
          $ref: '#/components/schemas/AssetId'
        name:
          $ref: '#/components/schemas/AssetName'
      required:
        - assetId
        - name
    AssetBasicProjected:
      additionalProperties: false
      type: object
      properties:
        assetId:
          $ref: '#/components/schemas/AssetId'
        assetLabelIds:
          items:
            $ref: '#/components/schemas/LabelId'
          type: array
        assetLabels:
          type: array
          items:
            $ref: '#/components/schemas/LabelBasicWithColor'
        collectionId:
          $ref: '#/components/schemas/CollectionId'
        name:
          $ref: '#/components/schemas/AssetName'
        access:
          $ref: '#/components/schemas/AclRuleAccess'
      required:
        - assetId
        - name
    AssetCount:
      minimum: 0
      type: integer
    AssetCreateBatch:
      type: array
      items:
        $ref: '#/components/schemas/AssetBatchItem'
      minItems: 1
    AssetBatchItem: 
      additionalProperties: false
      type: object
      properties:
        description:
          $ref: '#/components/schemas/AssetDescription'
        fqdn:
          $ref: '#/components/schemas/AssetFqdn'
        ip:
          $ref: '#/components/schemas/AssetIp'
        labelNames:
          items:
            $ref: '#/components/schemas/LabelName'
          type: array
        mac:
          $ref: '#/components/schemas/AssetMac'
        metadata:
          $ref: '#/components/schemas/Metadata'
        name:
          $ref: '#/components/schemas/AssetName'
        noncomputing:
          $ref: '#/components/schemas/AssetNoncomputing'
        stigs:
          description: The benchmarkIds mapped to this Asset
          items:
            type: string
          type: array
      required:
        - name
        - description
        - ip
        - noncomputing
        - metadata
        - stigs
    AssetCreateOrReplace:
      additionalProperties: false
      type: object
      properties:
        collectionId:
          $ref: '#/components/schemas/CollectionId'
        description:
          $ref: '#/components/schemas/AssetDescription'
        fqdn:
          $ref: '#/components/schemas/AssetFqdn'
        ip:
          $ref: '#/components/schemas/AssetIp'
        labelNames:
          items:
            $ref: '#/components/schemas/LabelName'
          type: array
        mac:
          $ref: '#/components/schemas/AssetMac'
        metadata:
          $ref: '#/components/schemas/Metadata'
        name:
          $ref: '#/components/schemas/AssetName'
        noncomputing:
          $ref: '#/components/schemas/AssetNoncomputing'
        stigs:
          description: The benchmarkIds mapped to this Asset
          items:
            type: string
          type: array
      required:
        - name
        - collectionId
        - description
        - ip
        - noncomputing
        - metadata
        - stigs
    AssetDescription:
      $ref: '#/components/schemas/String255Nullable'
    AssetForCollection:
      additionalProperties: false
      type: object
      properties:
        assetId:
          $ref: '#/components/schemas/AssetId'
        name:
          $ref: '#/components/schemas/AssetName'
    AssetFqdn:
      $ref: '#/components/schemas/String255Nullable'
    AssetId:
      $ref: '#/components/schemas/StringIntId'
    AssetIp:
      $ref: '#/components/schemas/String255Nullable'
    AssetMac:
      $ref: '#/components/schemas/String255Nullable'
    AssetName:
      $ref: '#/components/schemas/String255'
    AssetNoncomputing:
      type: boolean
    AssetProjected:
      additionalProperties: false
      type: object
      properties:
        assetId:
          $ref: '#/components/schemas/AssetId'
        collection:
          $ref: '#/components/schemas/CollectionBasic'
        description:
          $ref: '#/components/schemas/AssetDescription'
        fqdn:
          $ref: '#/components/schemas/AssetFqdn'
        ip:
          $ref: '#/components/schemas/AssetIp'
        labelIds:
          type: array
          items:
            $ref: '#/components/schemas/LabelId'
        labels:
          type: array
          items:
            $ref: '#/components/schemas/LabelBasicWithColor'
        mac:
          $ref: '#/components/schemas/AssetMac'
        metadata:
          $ref: '#/components/schemas/Metadata'
        name:
          $ref: '#/components/schemas/AssetName'
        noncomputing:
          $ref: '#/components/schemas/AssetNoncomputing'
        statusStats:
          additionalProperties: false
          type: object
          properties:
            acceptedCount:
              nullable: true
              type: integer
            maxTs:
              $ref: '#/components/schemas/MaxTs'
            minTs:
              $ref: '#/components/schemas/MinTs'
            rejectedCount:
              nullable: true
              type: integer
            ruleCount:
              $ref: '#/components/schemas/RuleCount'
            savedCount:
              nullable: true
              type: integer
            stigCount:
              type: integer
            submittedCount:
              nullable: true
              type: integer
        stigs:
          type: array
          description: The benchmarkIds mapped to this Asset
          items:
            $ref: '#/components/schemas/CollectionStig'
      required:
        - assetId
        - name
        - fqdn
        - collection
        - description
        - ip
        - mac
        - noncomputing
        - labelIds
    AssetStigResponse:
      additionalProperties: false
      type: object
      properties:
        benchmarkId:
          $ref: '#/components/schemas/BenchmarkId'
        revisionDate:
          $ref: '#/components/schemas/RevisionDate'
        revisionStr:
          $ref: '#/components/schemas/RevisionStrRaw'
        ruleCount:
          $ref: '#/components/schemas/RuleCount'
      required:
        - benchmarkId
        - revisionStr
        - revisionDate
        - ruleCount
    AssetStigSelection:
      additionalProperties: false
      type: object
      description: >
        An array that specifies a list of Assets/STIG items.


        Each array item is an object that MUST include the property `assetId`
        and MAY include the property `stigs`.


        If the `stigs` property is absent, the default value of the property is
        used. The default value is an array of the default revisions of each
        STIG to which the requesting User

        has been granted access on the Asset.


        If the `stigs` property is present, the value MUST be an array. Each
        array member is EITHER:

        - an object that identifies both a `benchmarkId` and a specific
        `revisionStr`

        - a string whose value is a `benchmarkId`. This is equivalent to
        specifying the object {"benchmarkId": [provided benchmarkId],
        "revisionStr": [default revisionStr for the provided benchmarkId]}
      properties:
        assetId:
          $ref: '#/components/schemas/AssetId'
        stigs:
          maxItems: 30
          minItems: 1
          type: array
          uniqueItems: true
          items:
            oneOf:
              - $ref: '#/components/schemas/RevisionBasic'
              - $ref: '#/components/schemas/String255'
      required:
        - assetId
    AssetUpdate:
      additionalProperties: false
      type: object
      properties:
        collectionId:
          $ref: '#/components/schemas/CollectionId'
        description:
          $ref: '#/components/schemas/AssetDescription'
        fqdn:
          $ref: '#/components/schemas/AssetFqdn'
        ip:
          $ref: '#/components/schemas/AssetIp'
        labelNames:
          type: array
          items:
            $ref: '#/components/schemas/LabelName'
        mac:
          $ref: '#/components/schemas/AssetMac'
        metadata:
          $ref: '#/components/schemas/Metadata'
        name:
          $ref: '#/components/schemas/AssetName'
        noncomputing:
          $ref: '#/components/schemas/AssetNoncomputing'
        stigs:
          description: The benchmarkIds mapped to this Asset
          type: array
          items:
            $ref: '#/components/schemas/BenchmarkId'
    AssetsPatchRequest:
      additionalProperties: false
      type: object
      properties:
        assetIds:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/AssetId'
        operation:
          type: string
          enum:
            - delete
      required:
        - assetIds
        - operation
    AssetsPatchResponse:
      additionalProperties: false
      type: object
      properties:
        assetIds:
          type: array
          items:
            $ref: '#/components/schemas/AssetId'
        operation:
          type: string
          enum:
            - deleted
    Attribution:
      type: object
      properties:
        userId:
          $ref: '#/components/schemas/UserId'
        username:
          $ref: '#/components/schemas/Username'
        ts:
          $ref: '#/components/schemas/StringDateTime'
    Attributions:
      type: object
      properties:
        created:
          $ref: '#/components/schemas/Attribution'
        modified:
          $ref: '#/components/schemas/Attribution'
    BenchmarkId:
      $ref: '#/components/schemas/String255Nullable'
    Cci:
      additionalProperties: false
      type: object
      properties:
        cci:
          $ref: '#/components/schemas/CciString'
        contributor:
          type: string
        definition:
          $ref: '#/components/schemas/DefinitionString'
        emassAp:
          $ref: '#/components/schemas/EmassAp'
        publishdate:
          $ref: '#/components/schemas/StringDateTime'
        references:
          type: array
          items:
            $ref: '#/components/schemas/CciReferenceItem'
        status:
          $ref: '#/components/schemas/CciStatus'
        stigs:
          items:
            $ref: '#/components/schemas/RevisionBasic'
          type: array
        type:
          $ref: '#/components/schemas/CciType'
    CciBasic:
      additionalProperties: false
      type: object
      properties:
        apAcronym:
          $ref: '#/components/schemas/ApAcronym'
        cci:
          $ref: '#/components/schemas/CciString'
        control:
          nullable: true
          type: string
        definition:
          $ref: '#/components/schemas/DefinitionString'
      required:
        - cci
        - apAcronym
        - definition
        - control
    CciListItem:
      additionalProperties: false
      type: object
      properties:
        cci:
          $ref: '#/components/schemas/CciString'
        references:
          type: array
          items:
            $ref: '#/components/schemas/CciReferenceItem'
        type:
          $ref: '#/components/schemas/CciType'
    CciLocation:
      $ref: '#/components/schemas/String255'
    CciReferenceItem:
      additionalProperties: false
      type: object
      properties:
        creator:
          type: string
        indexDisa:
          $ref: '#/components/schemas/IndexDisa'
        location:
          $ref: '#/components/schemas/CciLocation'
        parentControl:
          $ref: '#/components/schemas/ParentControl'
        textRefNist:
          $ref: '#/components/schemas/TextRefNist'
        title:
          $ref: '#/components/schemas/CciString'
        version:
          $ref: '#/components/schemas/VersionString'
    CciStatus:
      $ref: '#/components/schemas/String20'
    CciString:
      $ref: '#/components/schemas/String255'
    CciType:
      $ref: '#/components/schemas/String20'
    Check:
      additionalProperties: false
      type: object
      properties:
        content:
          type: string
        system:
          type: string
    ChecklistAssetStig:
      type: array
      items:
        additionalProperties: false
        type: object
        properties:
          assetId:
            $ref: '#/components/schemas/AssetId'
          autoResult:
            type: boolean
          comment:
            $ref: '#/components/schemas/CommentaryStringNullable'
          detail:
            $ref: '#/components/schemas/CommentaryStringNullable'
          groupId:
            $ref: '#/components/schemas/GroupId'
          groupTitle:
            $ref: '#/components/schemas/GroupTitle'
          result:
            $ref: '#/components/schemas/ChecklistResult'
          resultEngine:
            $ref: '#/components/schemas/ResultEngine'
          rule:
            $ref: '#/components/schemas/RuleProjected'
          ruleId:
            $ref: '#/components/schemas/RuleId'
          ruleTitle:
            $ref: '#/components/schemas/RuleTitle'
          severity:
            $ref: '#/components/schemas/RuleSeverity'
          status:
            $ref: '#/components/schemas/ChecklistStatus'
          statusTs:
            $ref: '#/components/schemas/StringDateTimeNullable'
          touchTs:
            $ref: '#/components/schemas/StringDateTimeNullable'
          ts:
            $ref: '#/components/schemas/StringDateTimeNullable'
          version:
            $ref: '#/components/schemas/VersionString'
    ChecklistCkl:
      additionalProperties: false
      description: The CKL format generated and read by DISA STIG Viewer
      type: object
      properties:
        ASSET:
          type: object
          additionalProperties: false
          properties:
            ASSET_TYPE:
              type: string
            HOST_FQDN:
              type: string
            HOST_GUID:
              type: string
            HOST_IP:
              type: string
            HOST_MAC:
              type: string
            HOST_NAME:
              type: string
            TARGET_KEY:
              type: string
            TECH_AREA:
              type: string
        STIGS:
          type: object
          additionalProperties: false
          properties:
            iSTIG:
              type: array
              items:
                type: object
                properties:
                  STIG_INFO:
                    type: array
                    items:
                      type: object
                      properties:
                        SI_DATA:
                          type: object
                          properties:
                            SID_DATA:
                              type: string
                            SID_NAME:
                              type: string
                  VULN:
                    type: array
                    items:
                      type: object
                      additionalProperties: false
                      properties:
                        COMMENTS:
                          type: string
                        FINDING_DETAILS:
                          type: string
                        SEVERITY_JUSTIFICATION:
                          type: string
                        SEVERITY_OVERRIDE:
                          type: string
                        STATUS:
                          type: string
                          enum:
                            - Open
                            - NotAFinding
                            - Not_Applicable
                            - Not_Reviewed
                        STIG_DATA:
                          type: array
                          items:
                            type: object
                            properties:
                              ATTRIBUTE_DATA:
                                type: string
                              VULN_ATTRIBUTE:
                                type: string
      xml:
        name: CHECKLIST
    ChecklistCklb:
      additionalProperties: false
      description: The CKLB format generated and read by DISA STIG VIewer 3
      type: object
      properties:
        title:
          type: string
        id:
          type: string
          format: uuid
        active:
          type: boolean
        mode:
          type: integer
        has_path:
          type: boolean
        target_data:
          $ref: '#/components/schemas/TargetData'
        stigs:
          type: array
          items:
            $ref: '#/components/schemas/StigCklb'
    ChecklistJsonAccess:
      type: object
      properties:
        access:
          $ref: '#/components/schemas/AclRuleAccess'
        checklist:
          $ref: '#/components/schemas/ChecklistAssetStig'
    TargetData:
      type: object
      properties:
        target_type:
          type: string
        host_name:
          $ref: '#/components/schemas/AssetName'
        ip_address:
          $ref: '#/components/schemas/AssetIp'
        mac_address:
          $ref: '#/components/schemas/AssetMac'
        fqdn:
          $ref: '#/components/schemas/AssetFqdn'
        comments:
          type: string
        role:
          type: string
        is_web_database:
          type: boolean
        technology_area:
          type: string
        web_db_site:
          type: string
        web_db_instance:
          type: string
    StigCklb:
      type: object
      properties:
        stig_name:
          type: string
        display_name:
          type: string
        stig_id:
          type: string
        version:
          type: string
        release_info:
          type: string
        uuid:
          type: string
          format: uuid
        reference_identifier:
          type: string
        size:
          type: integer
        rules:
          type: array
          items:
            $ref: '#/components/schemas/Rule'
    Rule:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
        stig_uuid:
          type: string
          format: uuid
        target_key:
          type: string
          nullable: true
        stig_ref:
          type: string
          nullable: true
        group_id:
          type: string
        rule_id:
          type: string
        rule_id_src:
          type: string
        weight:
          type: string
        classification:
          type: string
        severity:
          type: string
        rule_version:
          type: string
        group_title:
          type: string
        rule_title:
          type: string
        fix_text:
          type: string
        false_positives:
          type: string
          nullable: true
        false_negatives:
          type: string
          nullable: true
        discussion:
          type: string
        check_content:
          type: string
        documentable:
          type: string
        mitigations:
          type: string
          nullable: true
        potential_impacts:
          type: string
          nullable: true
        third_party_tools:
          type: string
          nullable: true
        mitigation_control:
          type: string
          nullable: true
        responsibility:
          type: string
          nullable: true
        security_override_guidance:
          type: string
          nullable: true
        ia_controls:
          type: string
          nullable: true
        check_content_ref:
          type: object
          properties:
            href:
              type: string
            name:
              type: string
        legacy_ids:
          type: array
          items:
            type: string
        group_tree:
          type: array
          items:
            $ref: '#/components/schemas/GroupTree'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        STIGUuid:
          type: string
          format: uuid
        status:
          type: string
        overrides:
          type: object
        comments:
          type: string
        finding_details:
          type: string
        ccis:
          type: array
          items:
            type: string
    GroupTree:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        description:
          type: string
    ChecklistCollectionCounts:
      additionalProperties: false
      type: object
      properties:
        results:
          type: object
          additionalProperties: false
          properties:
            fail:
              type: integer
            notapplicable:
              type: integer
            other:
              type: integer
            pass:
              type: integer
        statuses:
          additionalProperties: false
          type: object
          properties:
            accepted:
              type: integer
            rejected:
              type: integer
            saved:
              type: integer
            submitted:
              type: integer
    ChecklistCollectionStig:
      additionalProperties: false
      type: object
      properties:
        counts:
          $ref: '#/components/schemas/ChecklistCollectionCounts'
        groupId:
          $ref: '#/components/schemas/GroupId'
        groupTitle:
          $ref: '#/components/schemas/GroupTitle'
        ruleId:
          $ref: '#/components/schemas/RuleId'
        ruleTitle:
          $ref: '#/components/schemas/RuleTitle'
        severity:
          $ref: '#/components/schemas/RuleSeverity'
        timestamps:
          additionalProperties: false
          type: object
          properties:
            statusTs:
              $ref: '#/components/schemas/ChecklistCollectionStigTimestamps'
            touchTs:
              $ref: '#/components/schemas/ChecklistCollectionStigTimestamps'
            ts:
              $ref: '#/components/schemas/ChecklistCollectionStigTimestamps'
        version:
          $ref: '#/components/schemas/VersionString'
    ChecklistCollectionStigTimestamp:
      $ref: '#/components/schemas/StringDateTimeNullable'
    ChecklistCollectionStigTimestamps:
      additionalProperties: false
      type: object
      properties:
        max:
          $ref: '#/components/schemas/ChecklistCollectionStigTimestamp'
        min:
          $ref: '#/components/schemas/ChecklistCollectionStigTimestamp'
    ChecklistResult:
      description: The Review result
      type: string
      nullable: true
      enum:
        - fail
        - pass
        - notapplicable
        - notchecked
        - unknown
        - error
        - notselected
        - informational
        - fixed
        - null
    ChecklistResultUnreviewed:
      description: The Review result
      type: string
      enum:
        - notchecked
        - unknown
        - error
        - notselected
        - informational
        - fixed
        - null
      nullable: true
    ChecklistStatus:
      type: string
      nullable: true
      enum:
        - saved
        - submitted
        - accepted
        - rejected
        - null
    ChecklistXccdf:
      additionalProperties: true
      type: object
      description: >
        An XCCDF document with TestResult. Note: OAS 3.x cannot represent the
        actual XML schema
      xml:
        name: Benchmark
        namespace: http://checklists.nist.gov/xccdf/1.2
    ClientErrorBadAssetPost:
      additionalProperties: false
      type: object
      properties:
        code:
          type: string
          enum:
            - "422"
          nullable: true
        error:
          type: string
        detail:
          type: array
          items:
            type: object
            properties:
              failure: 
                type: string
              detail:
                type: object
                properties:
                  name:
                    type: string
                  assetIndex:
                    type: integer
                  benchmarkId:
                    type: string
                  benchmarkIdIndex:
                    type: integer
                  labelName:
                    type: string
                  labelIndex:
                    type: integer
      required:
        - error
        - detail
    ClientErrorDuplicateCollection:
      additionalProperties: false
      type: object
      properties:
        code:
          type: string
          enum:
            - "400"
        data:
          $ref: '#/components/schemas/Collection'
        message:
          type: string
          enum:
            - Duplicate name
    Collection:
      additionalProperties: false
      type: object
      properties:
        collectionId:
          $ref: '#/components/schemas/CollectionId'
        created:
          $ref: '#/components/schemas/Created'
        description:
          $ref: '#/components/schemas/CollectionDescription'
        metadata:
          $ref: '#/components/schemas/Metadata'
        name:
          $ref: '#/components/schemas/CollectionName'
        settings:
          $ref: '#/components/schemas/CollectionSettings'
      required:
        - collectionId
        - name
        - description
        - settings
        - metadata
        - created
    CollectionBasic:
      additionalProperties: false
      type: object
      properties:
        collectionId:
          $ref: '#/components/schemas/CollectionId'
        name:
          $ref: '#/components/schemas/CollectionName'
    CollectionCloneOptions:
      additionalProperties: false
      type: object
      properties:
        assets:
          type: boolean
          default: true
          deprecated: true
          enum:
            - true
          description: >-
            Deprecated. The source Collection's Assets and their core
            properties are always cloned. This option is retained for
            compatibility and only accepts true.
        grants:
          default: true
          type: boolean
          description: >-
            Clone the source Collection's users and their grants. Whether this
            option is enabled or not, the creator of the cloned Collection (ie.
            you) will be given an Owner grant in the clone.
        labels:
          type: boolean
          default: true
          deprecated: true
          enum:
            - true
          description: >-
            Deprecated. The source Collection's Labels and their Asset mappings
            are always cloned. This option is retained for compatibility and
            only accepts true.
        pinRevisions:
          default: matchSource
          type: string
          description: >
            <b>matchSource:</b> STIGs in the source Collection that are pinned
            to a specific Revision will be pinned to that Revision in the clone.
            STIGs that track the latest Revision (unpinned) in the source will
            be unpinned in the clone.<br><br><b>sourceDefaults:</b> All STIGs in
            the clone will be pinned to a specific Revision. STIGs that are
            pinned to a specific Revision in the source Collection will be
            pinned to that Revision in the clone. STIGs that track the latest
            Revision in the source will be pinned to the current latest Revision
            in the clone.
          enum:
            - matchSource
            - sourceDefaults

        stigMappings:
          default: withReviews
          type: string
          description: >
            <b>withReviews:</b> Assets will be cloned with their current STIG
            assignments and ALL stored Reviews. This will include Reviews that
            are no longer associated with a current STIG assignment or are
            associated with a non-default Revision of a
            STIG.<br><br><b>withoutReviews:</b> Assets will be cloned with their
            current STIG assignments but NO stored Reviews will be cloned. All
            Metrics will be set to zero.
          enum:
            - withReviews
            - withoutReviews
    CollectionCloneRequest:
      additionalProperties: false
      type: object
      properties:
        description:
          $ref: '#/components/schemas/CollectionDescription'
        name:
          $ref: '#/components/schemas/CollectionName'
        options:
          $ref: '#/components/schemas/CollectionCloneOptions'
      required:
        - name
        - description
    CollectionCloneResponse:
      description: >
        The response body is a stream of newline-delimited JSON (NDJSON) objects
        reporting the progress of the (possibly long running) cloning process.
        Each object conforms to this schema, but not all objects will have every
        property.<br/><br/>The sequence of objects starts with multiple
        {"stage": "collection"} objects, optionally followed by multiple
        {"stage": "reviews"} objects if review cloning is requested, and
        concludes with one {"stage": "result"} object whose "collection"
        property value conforms to the CollectionProjected schema for the
        created Collection.<br/><br/>Success is indicated when the final
        {"stage": "result"} message is sent. Errors that prevent cloning from
        completing are reported with {"status": "error"} and the "result" stage
        is not reported. Note that the endpoint will return HTTP status 200
        immediately after the request is validated and the cloning process has
        started, so you should not rely on status 200 for indication of cloning
        success.
      type: object
      properties:
        collection:
          $ref: '#/components/schemas/CollectionProjected'
        error:
          type: object
        message:
          type: string
        stack:
          type: string
        stage:
          enum:
            - collection
            - reviews
            - result
          type: string
        status:
          enum:
            - running
            - finished
            - error
          type: string
        step:
          type: integer
        stepCount:
          type: integer
        stepName:
          type: string
    CollectionCreateOrReplace:
      additionalProperties: false
      type: object
      properties:
        description:
          $ref: '#/components/schemas/CollectionDescription'
        grants:
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/UserGrant'
              - $ref: '#/components/schemas/UserGroupGrant'
        labels:
          type: array
          items:
            $ref: '#/components/schemas/LabelCreate'
          
        metadata:
          $ref: '#/components/schemas/Metadata'
        name:
          $ref: '#/components/schemas/CollectionName'
        settings:
          $ref: '#/components/schemas/CollectionSettings'
      required:
        - name
        - grants
    CollectionDescription:
      $ref: '#/components/schemas/String255Nullable'
    CollectionExportToResponse:
      description: >
        The response body is a stream of newline-delimited JSON (NDJSON) objects
        reporting the progress of the (possibly long running) export process.
        Each object conforms to this schema, but not all objects will have every
        property.<br/><br/>The sequence of objects starts with multiple
        {"stage": "prepare"} objects, followed by multiple {"stage": "assets"}
        objects, multiple {"stage": "reviews"} objects, and multiple {"stage":
        "metrics"} objects. The stream concludes with one {"stage": "commit"}
        object and then one {"stage": "result"} object whose "counts" property
        value conforms to the schema below.<br/><br/>Success is indicated when
        the final {"stage": "result"} message is sent. Errors that prevent
        exporting from completing are reported with {"status": "error"} and the
        "result" stage is not reported. Note that the endpoint will return HTTP
        status 200 immediately after the request is validated and the export
        process has started, so you should not rely on status 200 for indication
        of export success.
      type: object
      properties:
        counts:
          additionalProperties: false
          type: object
          properties:
            assetsCreated:
              type: integer
            reviewsInserted:
              type: integer
            reviewsUpdated:
              type: integer
            stigsMapped:
              type: integer
        error:
          type: object
        message:
          type: string
        stack:
          type: string
        stage:
          enum:
            - prepare
            - assets
            - reviews
            - metrics
            - result
          type: string
        status:
          enum:
            - running
            - error
          type: string
        step:
          type: integer
        stepCount:
          type: integer
        stepName:
          type: string
    CollectionFieldEnabledAlways:
      additionalProperties: false
      type: object
      properties:
        enabled:
          type: string
          enum:
            - always
        required:
          type: string
          enum:
            - always
            - findings
            - optional
      required:
        - enabled
        - required
    CollectionFieldEnabledFindings:
      additionalProperties: false
      type: object
      properties:
        enabled:
          type: string
          enum:
            - findings
        required:
          type: string
          enum:
            - findings
            - optional
      required:
        - enabled
        - required
    CollectionFieldSetting:
      type: object
      example:
        enabled: always
        required: findings
      oneOf:
        - $ref: '#/components/schemas/CollectionFieldEnabledAlways'
        - $ref: '#/components/schemas/CollectionFieldEnabledFindings'
    CollectionFieldSettings:
      additionalProperties: false
      type: object
      properties:
        comment:
          $ref: '#/components/schemas/CollectionFieldSetting'
        detail:
          $ref: '#/components/schemas/CollectionFieldSetting'
      required:
        - detail
        - comment
    CollectionGrant:
      additionalProperties: false
      type: object
      properties:
        roleId:
          $ref: '#/components/schemas/RoleId'
        collectionId:
          $ref: '#/components/schemas/CollectionId'
      required:
        - collectionId
        - roleId
    CollectionGrantProjected:
      additionalProperties: false
      type: object
      properties:
        roleId:
          $ref: '#/components/schemas/RoleId'
        collection:
          type: object
          properties:
            collectionId:
              $ref: '#/components/schemas/CollectionId'
            name:
              $ref: '#/components/schemas/CollectionName'
        grantees:
          $ref: '#/components/schemas/Grantees'
    CollectionHistorySettings:
      additionalProperties: false
      type: object
      properties:
        maxReviews:
          example: 5
          maximum: 15
          minimum: 0
          type: integer
      required:
        - maxReviews
    CollectionId:
      $ref: '#/components/schemas/StringIntId'
    CollectionImportOptions:
      additionalProperties: false
      type: object
      properties:
        autoStatus:
          $ref: '#/components/schemas/CollectionImportAutoStatus'
        unreviewed:
          description: |
            Controls how to handle unreviewed rules (those with result = 'notchecked').
            - 'never': Don't import unreviewed rules
            - 'commented': Import unreviewed rules that have comments, using the result specified in unreviewedCommented
            - 'always': Import all unreviewed rules, using the result specified in unreviewedCommented for those with comments
          type: string
          enum:
            - never
            - commented
            - always
        unreviewedCommented:
          description: |
            The result to use for unreviewed rules that have comments, when unreviewed is set to 'commented' or 'always'.
          type: string
          enum:
            - notchecked
            - informational
        emptyDetail:
          description: |
            Controls how to handle rules with empty finding details.
            - 'ignore': Leave the detail field null
            - 'import': Import the empty detail (as an empty string)
            - 'replace': Replace with a default message
          type: string
          enum:
            - ignore
            - import
            - replace
        emptyComment:
          description: |
            Controls how to handle rules with empty comments.
            - 'ignore': Leave the comment field null
            - 'import': Import the empty comment (as an empty string)
            - 'replace': Replace with a default message
          type: string
          enum:
            - ignore
            - import
            - replace
        updateAssetProps:
          description: |
            Flag indicating whether to update Asset information (IP, MAC, FQDN, noncomputing, and metadata including role and tech area) when Asset already exists in the Collection.
          type: boolean
        allowCustom:
          description: |
            Flag indicating whether Clients may POST reviews that do not conform to importOptions specified.
          type: boolean
      required:
        - autoStatus
        - unreviewed
        - unreviewedCommented
        - emptyDetail
        - emptyComment
        - allowCustom
    CollectionImportAutoStatus:
      type: object
      additionalProperties: false
      description: |
        Determines how to set the status property of imported reviews for each evaluation result.
        Each property must be one of:
         - 'null': Don't set a status (Keep existing Review Status)
         - 'saved': Always set status to 'saved'
         - 'submitted': Set status to 'submitted' if the review is submittable per Collection settings
         - 'accepted': Set status to 'accepted' if the review is submittable, and User has permission to accept,  otherwise 'submitted'
      properties:
        fail:
          $ref: '#/components/schemas/ReviewStatusOption'
        notapplicable:
          $ref: '#/components/schemas/ReviewStatusOption'
        pass:
          $ref: '#/components/schemas/ReviewStatusOption'
      required:
      - fail
      - notapplicable
      - pass
    CollectionName:
      $ref: '#/components/schemas/String45'
    CollectionProjected:
      additionalProperties: false
      type: object
      properties:
        assets:
          type: array
          items:
            $ref: '#/components/schemas/AssetForCollection'
        collectionId:
          $ref: '#/components/schemas/CollectionId'
        description:
          $ref: '#/components/schemas/CollectionDescription'
        grants:
          type: array
          items:
            anyOf:
             - $ref: '#/components/schemas/UserGrantProjected'     
             - $ref: '#/components/schemas/UserGroupGrantProjected'     
        users:
          type: array
          items:
            $ref: '#/components/schemas/GrantEffective'
        labels:
          type: array
          items:
            $ref: '#/components/schemas/Label'
        metadata:
          $ref: '#/components/schemas/Metadata'
        name:
          $ref: '#/components/schemas/CollectionName'
        owners:
          type: array
          items:
            $ref: '#/components/schemas/Owner'
        settings:
          $ref: '#/components/schemas/CollectionSettings'
        statistics:
          $ref: '#/components/schemas/CollectionStatistics'
        stigs:
          type: array
          items:
            $ref: '#/components/schemas/CollectionStig'
      required:
        - collectionId
        - name
        - description
        - settings
        - metadata
    CollectionSettings:
      additionalProperties: false
      type: object
      properties:
        fields:
          $ref: '#/components/schemas/CollectionFieldSettings'
        history:
          $ref: '#/components/schemas/CollectionHistorySettings'
        status:
          $ref: '#/components/schemas/CollectionStatusSettings'
        importOptions:
          $ref: '#/components/schemas/CollectionImportOptions'
    CollectionSettingsRequired:
      additionalProperties: false
      type: object
      properties:
        fields:
          $ref: '#/components/schemas/CollectionFieldSettings'
        history:
          $ref: '#/components/schemas/CollectionHistorySettings'
        status:
          $ref: '#/components/schemas/CollectionStatusSettings'
        importOptions:
          $ref: '#/components/schemas/CollectionImportOptions'
      required:
        - fields
        - history
        - status
        - importOptions
    CollectionStatistics:
      additionalProperties: false
      type: object
      properties:
        assetCount:
          $ref: '#/components/schemas/AssetCount'
        checklistCount:
          type: integer
        created:
          $ref: '#/components/schemas/Created'
        userCount:
          type: integer
      required:
        - created
        - assetCount
        - userCount
        - checklistCount
    CollectionStatusCount:
      additionalProperties: false
      type: object
      properties:
        resultEngine:
          type: integer
        total:
          type: integer
      required:
        - total
        - resultEngine
    CollectionStatusSettings:
      additionalProperties: false
      type: object
      properties:
        canAccept:
          type: boolean
        minAcceptGrant:
          type: integer
          example: 2
          maximum: 4
          minimum: 2
        resetCriteria:
          type: string
          example: result
          enum:
            - any
            - result
      required:
        - canAccept
        - minAcceptGrant
        - resetCriteria
    CollectionStig:
      additionalProperties: false
      type: object
      properties:
        benchmarkDate:
          $ref: '#/components/schemas/StringDateNullable'
        benchmarkId:
          $ref: '#/components/schemas/BenchmarkId'
        revisionPinned:
          type: boolean
        revisionStr:
          $ref: '#/components/schemas/RevisionStr'
        ruleCount:
          $ref: '#/components/schemas/RuleCount'
      required:
        - benchmarkId
        - revisionStr
        - benchmarkDate
        - revisionPinned
        - ruleCount
    CollectionStigWithAssetCount:
      additionalProperties: false
      type: object
      properties:
        assetCount:
          $ref: '#/components/schemas/AssetCount'
        assets:
          items:
            $ref: '#/components/schemas/AssetForCollection'
          type: array
        benchmarkDate:
          $ref: '#/components/schemas/StringDateNullable'
        benchmarkId:
          $ref: '#/components/schemas/BenchmarkId'
        revisionPinned:
          type: boolean
        revisionStr:
          $ref: '#/components/schemas/RevisionStr'
        ruleCount:
          $ref: '#/components/schemas/RuleCount'
        title:
          $ref: '#/components/schemas/StatusText'
      required:
        - benchmarkId
        - revisionStr
        - benchmarkDate
        - revisionPinned
        - ruleCount
        - assetCount
    CollectionStigWithIsDefault:
      additionalProperties: false
      type: object
      properties:
        benchmarkDate:
          $ref: '#/components/schemas/StringDateNullable'
        benchmarkId:
          $ref: '#/components/schemas/BenchmarkId'
        isDefault:
          type: boolean
        revisionPinned:
          type: boolean
        revisionStr:
          $ref: '#/components/schemas/RevisionStr'
        ruleCount:
          $ref: '#/components/schemas/RuleCount'
      required:
        - benchmarkId
        - revisionStr
        - benchmarkDate
        - revisionPinned
        - ruleCount
        - isDefault
    CollectionUpdate:
      type: object
      additionalProperties: false
      minProperties: 1
      properties:
        description:
          $ref: '#/components/schemas/CollectionDescription'
        grants:
          type: array
          items:
            type: object
            properties:
              roleId:
                $ref: '#/components/schemas/RoleId'
              userId:
                $ref: '#/components/schemas/UserId'
        labels:
          type: array
          items:
            $ref: '#/components/schemas/LabelCreate'
        metadata:
          $ref: '#/components/schemas/Metadata'
        name:
          $ref: '#/components/schemas/CollectionName'
        settings:
          $ref: '#/components/schemas/CollectionSettingsRequired'
    CollectionsProjected:
      additionalProperties: false
      type: object
      properties:
        collectionId:
          $ref: '#/components/schemas/CollectionId'
        description:
          $ref: '#/components/schemas/CollectionDescription'
        metadata:
          $ref: '#/components/schemas/Metadata'
        name:
          $ref: '#/components/schemas/CollectionName'
        owners:
          type: array
          items:
            $ref: '#/components/schemas/Owner'
        settings:
          $ref: '#/components/schemas/CollectionSettings'
        statistics:
          $ref: '#/components/schemas/CollectionStatistics'
      required:
        - collectionId
        - name
        - description
        - settings
        - metadata
    CommentaryString:
      $ref: '#/components/schemas/String32767'
    CommentaryStringNullable:
      $ref: '#/components/schemas/String32767Nullable'
    CommitBranch:
      type: string
    CommitDescribe:
      type: string
    CommitObject:
      type: object
      additionalProperties: false
      properties:
        branch:
          $ref: '#/components/schemas/CommitBranch'
        describe:
          $ref: '#/components/schemas/CommitDescribe'
        sha:
          $ref: '#/components/schemas/CommitSha'
        tag:
          $ref: '#/components/schemas/CommitTag'
    CommitSha:
      type: string
    CommitTag:
      type: string
    Created:
      $ref: '#/components/schemas/StringDateTime'
    DefinitionString:
      nullable: true
      type: string
    Detail:
      type: object
      properties:
        assetStig:
          type: array
          items:
            $ref: '#/components/schemas/DetailAssetStig'
        dbInfo:
          $ref: '#/components/schemas/DetailMySqlInfo'
    DetailAssetStig:
      additionalProperties: false
      type: object
      properties:
        assetCnt:
          type: integer
        collectionId:
          $ref: '#/components/schemas/CollectionId'
        range01to05:
          type: integer
        range06to10:
          type: integer
        range11to15:
          type: integer
        range16plus:
          type: integer
    DetailMySqlInfo:
      type: object
      properties:
        tables:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/DetailMySqlTableInfo'
    DetailMySqlTableInfo:
      additionalProperties: false
      type: object
      properties:
        autoIncrement:
          nullable: true
          type: integer
        avgRowLength:
          nullable: true
          type: integer
        createTime:
          $ref: '#/components/schemas/StringDateTimeNullable'
        dataLength:
          nullable: true
          type: integer
        indexLength:
          nullable: true
          type: integer
        maxDataLength:
          nullable: true
          type: integer
        tableCollation:
          nullable: true
          type: string
        tableName:
          type: string
        tableRows:
          nullable: true
          type: integer
        updateTime:
          $ref: '#/components/schemas/StringDateTimeNullable'
    Dependencies:
      type: object
      properties:
        db:
          type: boolean
        oidc:
          type: boolean
    DisplayName:
      $ref: '#/components/schemas/String255Nullable'
    EffectiveAcl:
      additionalProperties: false
      type: object
      properties:
        access:
          $ref: '#/components/schemas/AclRuleAccess'
        asset:
          $ref: '#/components/schemas/AssetBasic'
        benchmarkId:
          $ref: '#/components/schemas/BenchmarkId'
        aclSources:
          type: array
          items:
            $ref: '#/components/schemas/AclSource'
    EmassAp:
      additionalProperties: false
      type: object
      nullable: true
      properties:
        apAcronym:
          $ref: '#/components/schemas/ApAcronym'
        assessmentProcedure:
          type: string
        implementation:
          type: string
    Endpoints:
      additionalProperties: false
      type: object
      properties:
        ui:
          type: string  
    Error:
      type: object
      properties:
        detail: {}
        error:
          type: string
        stack:
          type: string
    FindingProjected:
      additionalProperties: false
      type: object
      properties:
        apAcronym:
          $ref: '#/components/schemas/ApAcronym'
        assetCount:
          $ref: '#/components/schemas/AssetCount'
        assets:
          type: array
          items:
            $ref: '#/components/schemas/AssetBasic'
        cci:
          nullable: true
          type: string
        ccis:
          type: array
          minItems: 0
          items:
            $ref: '#/components/schemas/CciBasic'
        definition:
          $ref: '#/components/schemas/DefinitionString'
        groupId:
          $ref: '#/components/schemas/GroupId'
        groups:
          type: array
          items:
            $ref: '#/components/schemas/GroupProjected'
        ruleId:
          $ref: '#/components/schemas/RuleId'
        rules:
          type: array
          items:
            $ref: '#/components/schemas/RuleAbbr'
        severity:
          $ref: '#/components/schemas/RuleSeverity'
        stigs:
          type: array
          items:
            $ref: '#/components/schemas/CollectionStig'
        title:
          $ref: '#/components/schemas/RuleTitle'
    Fix:
      additionalProperties: false
      type: object
      properties:
        fixref:
          type: string
        text:
          type: string
    Grant:
      oneOf:
        - $ref: '#/components/schemas/UserGrantProjected'     
        - $ref: '#/components/schemas/UserGroupGrantProjected'
    GrantPost:
      oneOf:
        - $ref: '#/components/schemas/UserGrant'     
        - $ref: '#/components/schemas/UserGroupGrant'
    GrantEffective:
      type: object
      properties:
        roleId:
          $ref: '#/components/schemas/RoleId'
        grantees:
          $ref: '#/components/schemas/Grantees'
        user:
          $ref: '#/components/schemas/UserBasicWithDisplayName'
      required:
        - roleId
        - grantees
        - user
    Grantee:
      oneOf:
        - $ref: '#/components/schemas/UserBasic'
        - $ref: '#/components/schemas/UserGroupBasic'
    Grantees:
      type: array
      items:
        $ref: '#/components/schemas/Grantee'
    GrantId:
      $ref: '#/components/schemas/StringIntId'
    GroupId:
      $ref: '#/components/schemas/String255Nullable'
    GroupProjected:
      additionalProperties: false
      type: object
      properties:
        groupId:
          $ref: '#/components/schemas/GroupId'
        rules:
          type: array
          items:
            $ref: '#/components/schemas/RuleAbbr'
        severity:
          $ref: '#/components/schemas/RuleSeverity'
        title:
          $ref: '#/components/schemas/GroupTitle'
    GroupTitle:
      $ref: '#/components/schemas/String255Nullable'
    IndexDisa:
      $ref: '#/components/schemas/String255'
    IntegerMinimumZeroNullable:
      type: integer
      minimum: 0
      nullable: true
    Integer64MinimumZero:
      type: integer
      format: int64
      minimum: 0
    Integer64MinimumZeroNullable:
      type: integer
      format: int64
      minimum: 0
      nullable: true
    Job:
      additionalProperties: false
      type: object
      properties:
        jobId:
          $ref: '#/components/schemas/JobId'
        name:
          $ref: "#/components/schemas/String45"
        description:
          $ref: "#/components/schemas/String255Nullable"
        createdBy:
          $ref: '#/components/schemas/UserBasicNullable'
        created:
          $ref: '#/components/schemas/StringDateTime'
        updatedBy:
          $ref: '#/components/schemas/UserBasicNullable'
        updated:
          $ref: '#/components/schemas/StringDateTimeNullable'
        tasks:
          $ref: '#/components/schemas/JobTaskList'
        event:
          $ref: '#/components/schemas/JobEvent'
        runCount:
          type: integer
        lastRun:
          $ref: '#/components/schemas/JobRun'
      required: [jobId, name, tasks, created, createdBy]
    JobCreate:
      additionalProperties: false
      type: object
      properties:
        name:
          $ref: "#/components/schemas/String45"
        description:
          $ref: "#/components/schemas/String255Nullable"
        tasks:
          $ref: '#/components/schemas/JobTaskListCreate'
        event:
          $ref: '#/components/schemas/JobEventCreate'
      required: [name, tasks]
    JobEvent:
      oneOf:
        - type: integer
          nullable: true
        - $ref: '#/components/schemas/JobEventRecurring'
        - $ref: '#/components/schemas/JobEventOnce'
    JobEventCreate:
      oneOf:
        - $ref: '#/components/schemas/JobEventRecurringCreate'
        - $ref: '#/components/schemas/JobEventOnceCreate'
        - type: integer
          nullable: true
    JobEventOnce:
      additionalProperties: false
      type: object
      properties:
        eventId:
          $ref: "#/components/schemas/String45"
        type:
          type: string
          enum:
            - once
        starts:
          $ref: '#/components/schemas/StringDateTime'
        enabled:
          type: boolean
          default: true
      required: [eventId, starts, type]
    JobEventOnceCreate:
      additionalProperties: false
      type: object
      properties:
        type:
          type: string
          enum:
            - once
        starts:
          $ref: '#/components/schemas/StringDateTime'
      required: [starts, type]
    JobEventRecurring:
      additionalProperties: false
      type: object
      properties:
        eventId:
          $ref: "#/components/schemas/String45"
        type:
          type: string
          enum:
            - recurring
        interval:
          $ref: '#/components/schemas/JobInterval'
        starts:
          $ref: '#/components/schemas/StringDateTimeNullable'
        ends:
          $ref: '#/components/schemas/StringDateTimeNullable'
        enabled:
          type: boolean
          default: true
      required: [eventId, type, interval]
    JobEventRecurringCreate:
      additionalProperties: false
      type: object
      properties:
        type:
          type: string
          enum:
            - recurring
        interval:
          $ref: '#/components/schemas/JobInterval'
        starts:
          $ref: '#/components/schemas/StringDateTimeNullable'
        ends:
          $ref: '#/components/schemas/StringDateTimeNullable'
        enabled:
          type: boolean
          default: true
      required: [type, interval]
    JobInterval:
      additionalProperties: false
      type: object
      properties:
        value:
          type: string
        field:
          type: string
          enum:
            - minute
            - hour
            - day
            - week
            - month
      required: [value, field]
    JobId:
      $ref: '#/components/schemas/StringIntId'
    JobRun:
      additionalProperties: false
      nullable: true
      type: object
      properties:
        runId:
          $ref: '#/components/schemas/JobRunId'
        created:
          $ref: '#/components/schemas/StringDateTime'
        updated:
          $ref: '#/components/schemas/StringDateTimeNullable'
        state:
          $ref: '#/components/schemas/JobRunState'
        jobId:
          $ref: '#/components/schemas/JobId'
      required: [runId, created, state]
    JobRunCreated:
      additionalProperties: false
      type: object
      properties:
        runId:
          $ref: '#/components/schemas/JobRunId'
      required: [runId]
    JobRunId:
      $ref: '#/components/schemas/StringUuid'
    JobRunOutput:
      additionalProperties: false
      type: object
      properties:
        type:
          type: string
        message:
          type: string
        task:
          $ref: "#/components/schemas/String45"
        taskId:
          $ref: "#/components/schemas/JobTaskId"
        ts:
          $ref: '#/components/schemas/StringDateTime'
      required: [message, type, task, ts]
    JobRunState:
      type: string
      nullable: true
      enum:
        - running
        - completed
        - failed
    JobTask:
      type: object
      additionalProperties: false
      properties:
        taskId:
          $ref: '#/components/schemas/StringIntId'
        name:
          $ref: "#/components/schemas/String45"
        description:
          $ref: "#/components/schemas/String255Nullable"
        command:
          $ref: '#/components/schemas/String255'
        collectionConfig:
          type: string
          nullable: true
          description: OpenAPI $ref path to the per-collection config schema, null if not supported
        events:
          type: array
          items:
            $ref: '#/components/schemas/JobEvent'
      required: [taskId, name]
    JobTaskId:
      $ref: '#/components/schemas/StringIntId'
    JobTaskList:
      type: array
      minItems: 1
      items:
        $ref: '#/components/schemas/JobTask'
    JobTaskListCreate:
      type: array
      minItems: 1
      items:
        $ref: '#/components/schemas/JobTaskId'
    ReviewAgingTargetAsset:
      additionalProperties: false
      type: object
      required:
        - asset
      properties:
        asset:
          $ref: '#/components/schemas/AssetBasic'
        benchmarkId:
          $ref: '#/components/schemas/BenchmarkId'
    ReviewAgingTargetLabel:
      additionalProperties: false
      type: object
      required:
        - label
      properties:
        label:
          $ref: '#/components/schemas/LabelBasicWithColor'
        benchmarkId:
          $ref: '#/components/schemas/BenchmarkId'
    ReviewAgingTargetBenchmark:
      additionalProperties: false
      type: object
      required:
        - benchmarkId
      properties:
        benchmarkId:
          $ref: '#/components/schemas/BenchmarkId'
    ReviewAgingTarget:
      oneOf:
        - $ref: '#/components/schemas/ReviewAgingTargetAsset'
        - $ref: '#/components/schemas/ReviewAgingTargetLabel'
        - $ref: '#/components/schemas/ReviewAgingTargetBenchmark'
    ReviewAgingTargetAssetPut:
      additionalProperties: false
      type: object
      required:
        - assetId
      properties:
        assetId:
          $ref: '#/components/schemas/AssetId'
        benchmarkId:
          $ref: '#/components/schemas/BenchmarkId'
    ReviewAgingTargetLabelPut:
      additionalProperties: false
      type: object
      required:
        - labelId
      properties:
        labelId:
          $ref: '#/components/schemas/LabelId'
        benchmarkId:
          $ref: '#/components/schemas/BenchmarkId'
    ReviewAgingTargetBenchmarkPut:
      additionalProperties: false
      type: object
      required:
        - benchmarkId
      properties:
        benchmarkId:
          $ref: '#/components/schemas/BenchmarkId'
    ReviewAgingTargetPut:
      oneOf:
        - $ref: '#/components/schemas/ReviewAgingTargetAssetPut'
        - $ref: '#/components/schemas/ReviewAgingTargetLabelPut'
        - $ref: '#/components/schemas/ReviewAgingTargetBenchmarkPut'
    ReviewAgingConfig:
      type: array
      items:
        oneOf:
          - $ref: '#/components/schemas/ReviewAgingRuleDelete'
          - $ref: '#/components/schemas/ReviewAgingRuleUpdateStatus'
          - $ref: '#/components/schemas/ReviewAgingRuleUpdateResult'
    ReviewAgingConfigPut:
      type: array
      items:
        oneOf:
          - $ref: '#/components/schemas/ReviewAgingRuleDeletePut'
          - $ref: '#/components/schemas/ReviewAgingRuleUpdateStatusPut'
          - $ref: '#/components/schemas/ReviewAgingRuleUpdateResultPut'
    ReviewAgingRuleDelete:
      type: object
      additionalProperties: false
      required:
        - triggerField
        - triggerInterval
        - triggerAction
        - enabled
      properties:
        title:
          $ref: '#/components/schemas/String45Nullable'
        triggerField:
          type: string
          enum: [ts, statusTs, touchTs]
        triggerInterval:
          type: integer
          description: Interval in seconds
          minimum: 0
          maximum: 2147483647
        triggerAction:
          type: string
          enum: [delete]
        target:
          $ref: '#/components/schemas/ReviewAgingTarget'
        enabled:
          type: boolean
    ReviewAgingRuleUpdateStatus:
      type: object
      additionalProperties: false
      required:
        - triggerField
        - triggerInterval
        - triggerAction
        - updateField
        - updateValue
        - enabled
      properties:
        title:
          $ref: '#/components/schemas/String45Nullable'
        triggerField:
          type: string
          enum: [ts, statusTs, touchTs]
        triggerInterval:
          type: integer
          description: Interval in seconds
          minimum: 0
          maximum: 2147483647
        triggerAction:
          type: string
          enum: [update]
        updateField:
          type: string
          enum: [status]
        updateValue:
          type: string
          enum: [saved, submitted]
        target:
          $ref: '#/components/schemas/ReviewAgingTarget'
        enabled:
          type: boolean
    ReviewAgingRuleUpdateResult:
      type: object
      additionalProperties: false
      required:
        - triggerField
        - triggerInterval
        - triggerAction
        - updateField
        - updateValue
        - enabled
      properties:
        title:
          $ref: '#/components/schemas/String45Nullable'
        triggerField:
          type: string
          enum: [ts, statusTs, touchTs]
        triggerInterval:
          type: integer
          description: Interval in seconds
          minimum: 0
          maximum: 2147483647
        triggerAction:
          type: string
          enum: [update]
        updateField:
          type: string
          enum: [result]
        updateValue:
          type: string
          enum: [notchecked, informational]
        target:
          $ref: '#/components/schemas/ReviewAgingTarget'
        enabled:
          type: boolean
    ReviewAgingRuleDeletePut:
      type: object
      additionalProperties: false
      required:
        - triggerField
        - triggerInterval
        - triggerAction
        - enabled
      properties:
        title:
          $ref: '#/components/schemas/String45Nullable'
        triggerField:
          type: string
          enum: [ts, statusTs, touchTs]
        triggerInterval:
          type: integer
          description: Interval in seconds
          minimum: 0
          maximum: 2147483647
        triggerAction:
          type: string
          enum: [delete]
        target:
          $ref: '#/components/schemas/ReviewAgingTargetPut'
        enabled:
          type: boolean
    ReviewAgingRuleUpdateStatusPut:
      type: object
      additionalProperties: false
      required:
        - triggerField
        - triggerInterval
        - triggerAction
        - updateField
        - updateValue
        - enabled
      properties:
        title:
          $ref: '#/components/schemas/String45Nullable'
        triggerField:
          type: string
          enum: [ts, statusTs, touchTs]
        triggerInterval:
          type: integer
          description: Interval in seconds
          minimum: 0
          maximum: 2147483647
        triggerAction:
          type: string
          enum: [update]
        updateField:
          type: string
          enum: [status]
        updateValue:
          type: string
          enum: [saved, submitted]
        target:
          $ref: '#/components/schemas/ReviewAgingTargetPut'
        enabled:
          type: boolean
    ReviewAgingRuleUpdateResultPut:
      type: object
      additionalProperties: false
      required:
        - triggerField
        - triggerInterval
        - triggerAction
        - updateField
        - updateValue
        - enabled
      properties:
        title:
          $ref: '#/components/schemas/String45Nullable'
        triggerField:
          type: string
          enum: [ts, statusTs, touchTs]
        triggerInterval:
          type: integer
          description: Interval in seconds
          minimum: 0
          maximum: 2147483647
        triggerAction:
          type: string
          enum: [update]
        updateField:
          type: string
          enum: [result]
        updateValue:
          type: string
          enum: [notchecked, informational]
        target:
          $ref: '#/components/schemas/ReviewAgingTargetPut'
        enabled:
          type: boolean
    TaskOutputItem:
      type: object
      properties:
        seq:
          type: integer
        ts:
          type: string
          format: date-time
        taskId:
          type: string
        task:
          type: string
        type:
          type: string
        message:
          type: string
        collectionId:
          type: integer
          nullable: true
    JobUpdate:
      type: object
      additionalProperties: false
      minProperties: 1
      properties:
        name:
          $ref: "#/components/schemas/String45"
        description:
          $ref: "#/components/schemas/String255Nullable"
        tasks:
          $ref: '#/components/schemas/JobTaskListCreate'
        event:
          $ref: '#/components/schemas/JobEventCreate'

    Label:
      additionalProperties: false
      type: object
      properties:
        color:
          $ref: '#/components/schemas/StringHexColor'
        description:
          $ref: '#/components/schemas/String255Nullable'
        labelId:
          $ref: '#/components/schemas/LabelId'
        name:
          $ref: '#/components/schemas/LabelName'
        uses:
          type: integer
      required:
        - name
        - description
        - color
        - labelId
        - uses
    LabelBasic:
      additionalProperties: false
      type: object
      properties:
        labelId:
          $ref: '#/components/schemas/LabelId'
        name:
          $ref: '#/components/schemas/LabelName'
      required:
        - name
        - labelId
    LabelBasicWithColor:
      additionalProperties: false
      type: object
      properties:
        color:
          $ref: '#/components/schemas/StringHexColor'
        labelId:
          $ref: '#/components/schemas/LabelId'
        name:
          $ref: '#/components/schemas/LabelName'
      required:
        - name
        - color
        - labelId
    LabelCreate:
      additionalProperties: false
      type: object
      properties:
        color:
          $ref: '#/components/schemas/StringHexColor'
        description:
          $ref: '#/components/schemas/String255Nullable'
        name:
          $ref: '#/components/schemas/LabelName'
      required:
        - name
        - description
        - color
    LabelId:
      $ref: '#/components/schemas/StringUuid'
    LabelIdNullable:
      $ref: '#/components/schemas/StringUuidNullable'
    LabelName:
      maxLength: 16
      minLength: 1
      type: string
    LabelUpdate:
      additionalProperties: false
      type: object
      properties:
        color:
          $ref: '#/components/schemas/StringHexColor'
        description:
          $ref: '#/components/schemas/String255Nullable'
        name:
          $ref: '#/components/schemas/LabelName'
    LastMigration:
      type: integer
      minimum: 0
    LocationString:
      type: string
    MaxTs:
      format: date-time
      nullable: true
      type: string
    Metadata:
      type: object
      additionalProperties:
        type: string
    MetadataKey:
      type: string
    MetadataValue:
      type: string
    MetricsAggAsset:
      type: object
      properties:
        assetId:
          $ref: '#/components/schemas/AssetId'
        benchmarkIds:
          type: array
          items:
            $ref: '#/components/schemas/BenchmarkId'
        fqdn:
          $ref: '#/components/schemas/AssetFqdn'
        ip:
          $ref: '#/components/schemas/AssetIp'
        labels:
          type: array
          items:
            $ref: '#/components/schemas/LabelBasicWithColor'
        mac:
          $ref: '#/components/schemas/AssetMac'
        name:
          $ref: '#/components/schemas/AssetName'
        noncomputing:
          $ref: '#/components/schemas/AssetNoncomputing'
      required:
        - assetId
        - name
        - labels
        - benchmarkIds
    MetricsAggCollection:
      type: object
      properties:
        assets:
          type: integer
        checklists:
          type: integer
        collectionId:
          $ref: '#/components/schemas/CollectionId'
        name:
          $ref: '#/components/schemas/CollectionName'
        stigs:
          type: integer
      required:
        - collectionId
        - name
        - checklists
        - assets
        - stigs
    MetricsAggLabel:
      type: object
      properties:
        assets:
          type: integer
        labelId:
          $ref: '#/components/schemas/LabelIdNullable'
        name:
          nullable: true
          type: string
      required:
        - labelId
        - name
        - assets
    MetricsAggMeta:
      type: object
      properties:
        assets:
          type: integer
        checklists:
          type: integer
        collections:
          type: integer
        stigs:
          type: integer
      required:
        - collections
        - assets
        - stigs
        - checklists
    MetricsAggStig:
      type: object
      properties:
        assets:
          type: integer
        benchmarkId:
          $ref: '#/components/schemas/BenchmarkId'
        collections:
          type: integer
        marking:
          $ref: '#/components/schemas/RevisionMarkingNullable'
        revisionPinned:
          type: boolean
        revisionStr:
          $ref: '#/components/schemas/RevisionStrRaw'
        revisionDate:
          $ref: "#/components/schemas/StringDateNullable"
        ruleCount:
          $ref: '#/components/schemas/RuleCount'
        title:
          $ref: '#/components/schemas/StigTitle'
      required:
        - benchmarkId
        - marking
        - title
        - assets
        - revisionStr
        - revisionDate
        - ruleCount
    MetricsDetail:
      properties:
        metrics:
          additionalProperties: false
          type: object
          properties:
            assessed:
              type: integer
            assessedBySeverity:
              additionalProperties: false
              type: object
              properties:
                high:
                  type: integer
                low:
                  type: integer
                medium:
                  type: integer
              required:
                - low
                - medium
                - high
            assessments:
              type: integer
            assessmentsBySeverity:
              additionalProperties: false
              type: object
              properties:
                high:
                  type: integer
                low:
                  type: integer
                medium:
                  type: integer
              required:
                - low
                - medium
                - high
            findings:
              additionalProperties: false
              type: object
              properties:
                high:
                  type: integer
                low:
                  type: integer
                medium:
                  type: integer
              required:
                - low
                - medium
                - high
            maxTouchTs:
              $ref: '#/components/schemas/StringDateTimeNullable'
            maxTs:
              $ref: '#/components/schemas/MaxTs'
            minTs:
              $ref: '#/components/schemas/MinTs'
            results:
              additionalProperties: false
              type: object
              properties:
                error:
                  $ref: '#/components/schemas/CollectionStatusCount'
                fail:
                  $ref: '#/components/schemas/CollectionStatusCount'
                fixed:
                  $ref: '#/components/schemas/CollectionStatusCount'
                informational:
                  $ref: '#/components/schemas/CollectionStatusCount'
                notapplicable:
                  $ref: '#/components/schemas/CollectionStatusCount'
                notchecked:
                  $ref: '#/components/schemas/CollectionStatusCount'
                notselected:
                  $ref: '#/components/schemas/CollectionStatusCount'
                pass:
                  $ref: '#/components/schemas/CollectionStatusCount'
                unknown:
                  $ref: '#/components/schemas/CollectionStatusCount'
              required:
                - notchecked
                - notapplicable
                - pass
                - fail
                - unknown
                - error
                - notselected
                - informational
                - fixed
            statuses:
              type: object
              properties:
                accepted:
                  $ref: '#/components/schemas/CollectionStatusCount'
                rejected:
                  $ref: '#/components/schemas/CollectionStatusCount'
                saved:
                  $ref: '#/components/schemas/CollectionStatusCount'
                submitted:
                  $ref: '#/components/schemas/CollectionStatusCount'
          required:
            - assessed
            - assessedBySeverity
            - assessments
            - assessmentsBySeverity
            - findings
            - minTs
            - maxTs
            - maxTouchTs
            - results
            - statuses
      required:
        - metrics
    MetricsDetailAggAsset:
      allOf:
        - $ref: '#/components/schemas/MetricsAggAsset'
        - $ref: '#/components/schemas/MetricsDetail'
    MetricsDetailAggCollection:
      allOf:
        - $ref: '#/components/schemas/MetricsAggCollection'
        - $ref: '#/components/schemas/MetricsDetail'
    MetricsDetailAggLabel:
      allOf:
        - $ref: '#/components/schemas/MetricsAggLabel'
        - $ref: '#/components/schemas/MetricsDetail'
    MetricsDetailAggMeta:
      allOf:
        - $ref: '#/components/schemas/MetricsAggMeta'
        - $ref: '#/components/schemas/MetricsDetail'
    MetricsDetailAggStig:
      allOf:
        - $ref: '#/components/schemas/MetricsAggStig'
        - $ref: '#/components/schemas/MetricsDetail'
    MetricsDetailUnagg:
      allOf:
        - $ref: '#/components/schemas/MetricsUnagg'
        - $ref: '#/components/schemas/MetricsDetail'
    MetricsSummary:
      properties:
        metrics:
          additionalProperties: false
          type: object
          properties:
            assessed:
              type: integer
            assessedBySeverity:
              additionalProperties: false
              type: object
              properties:
                high:
                  type: integer
                low:
                  type: integer
                medium:
                  type: integer
              required:
                - low
                - medium
                - high                   
            assessments:
              type: integer
            assessmentsBySeverity:
              additionalProperties: false
              type: object
              properties:
                high:
                  type: integer
                low:
                  type: integer
                medium:
                  type: integer
              required:
                - low
                - medium
                - high              
            findings:
              additionalProperties: false
              type: object
              properties:
                high:
                  type: integer
                low:
                  type: integer
                medium:
                  type: integer
              required:
                - low
                - medium
                - high
            maxTouchTs:
              $ref: '#/components/schemas/StringDateTimeNullable'
            maxTs:
              $ref: '#/components/schemas/MaxTs'
            minTs:
              $ref: '#/components/schemas/MinTs'
            results:
              additionalProperties: false
              type: object
              properties:
                fail:
                  type: integer
                notapplicable:
                  type: integer
                other:
                  type: integer
                pass:
                  type: integer
              required:
                - fail
                - notapplicable
                - other
                - pass
            statuses:
              additionalProperties: false
              type: object
              properties:
                accepted:
                  type: integer
                rejected:
                  type: integer
                saved:
                  type: integer
                submitted:
                  type: integer
              required:
                - saved
                - submitted
                - accepted
                - rejected           
          required:
            - assessed
            - assessedBySeverity
            - assessments
            - assessmentsBySeverity
            - findings
            - minTs
            - maxTs
            - maxTouchTs
            - results
            - statuses
      required:
        - metrics
    MetricsSummaryAggAsset:
      allOf:
        - $ref: '#/components/schemas/MetricsAggAsset'
        - $ref: '#/components/schemas/MetricsSummary'
    MetricsSummaryAggCollection:
      allOf:
        - $ref: '#/components/schemas/MetricsAggCollection'
        - $ref: '#/components/schemas/MetricsSummary'
    MetricsSummaryAggLabel:
      allOf:
        - $ref: '#/components/schemas/MetricsAggLabel'
        - $ref: '#/components/schemas/MetricsSummary'
    MetricsSummaryAggMeta:
      allOf:
        - $ref: '#/components/schemas/MetricsAggMeta'
        - $ref: '#/components/schemas/MetricsSummary'
    MetricsSummaryAggStig:
      allOf:
        - $ref: '#/components/schemas/MetricsAggStig'
        - $ref: '#/components/schemas/MetricsSummary'
    MetricsSummaryUnagg:
      allOf:
        - $ref: '#/components/schemas/MetricsUnagg'
        - $ref: '#/components/schemas/MetricsSummary'
    MetricsUnagg:
      type: object
      properties:
        assetId:
          type: string
        benchmarkId:
          $ref: '#/components/schemas/BenchmarkId'
        labels:
          items:
            $ref: '#/components/schemas/LabelBasicWithColor'
          type: array
        name:
          type: string
        revisionPinned:
          type: boolean
        revisionStr:
          $ref: '#/components/schemas/RevisionStrRaw'
        revisionDate:
          $ref: "#/components/schemas/StringDateNullable"          
        title:
          $ref: '#/components/schemas/StigTitle'
      required:
        - assetId
        - name
        - labels
        - benchmarkId
        - title
        - revisionStr
        - revisionDate
        - revisionPinned
    MinTs:
      format: date-time
      nullable: true
      type: string
    Owner:
      oneOf:
        - $ref: '#/components/schemas/UserBasicWithDisplayName'     
        - $ref: '#/components/schemas/UserGroup'
    ParentControl:
      $ref: '#/components/schemas/String255'
    ResultEngine:
      additionalProperties: false
      type: object
      nullable: true
      properties:
        checkContent:
          $ref: '#/components/schemas/ResultEngineCheckContent'
        overrides:
          type: array
          items:
            $ref: '#/components/schemas/ResultEngineOverride'
          minItems: 1
        product:
          $ref: '#/components/schemas/String255'
        time:
          $ref: '#/components/schemas/StringDateTime'
        type:
          $ref: '#/components/schemas/ResultEngineType'
        version:
          $ref: '#/components/schemas/VersionString'
      required:
        - product
        - type
    ResultEngineCheckContent:
      additionalProperties: false
      nullable: true
      type: object       
      properties:
        component:
          $ref: '#/components/schemas/String255'
        location:
          $ref: '#/components/schemas/LocationString'
      required:
        - location
    ResultEngineOverride:
      additionalProperties: false
      type: object
      properties:
        authority:
          $ref: '#/components/schemas/String255'
        newResult:
          $ref: '#/components/schemas/ReviewResult'
        oldResult:
          $ref: '#/components/schemas/ReviewResult'
        remark:
          $ref: '#/components/schemas/String255'
        time:
          $ref: '#/components/schemas/StringDateTime'
      required:
        - authority
        - oldResult
        - newResult
    ResultEngineType:
      type: string
      enum:
        - scap
        - script
        - other
    ReviewAsset:
      type: object
      properties:
        autoResult:
          type: boolean
        comment:
          $ref: '#/components/schemas/CommentaryString'
        detail:
          $ref: '#/components/schemas/CommentaryString'
        history:
          type: array
          items:
            $ref: '#/components/schemas/ReviewHistory'
        metadata:
          $ref: '#/components/schemas/Metadata'
        result:
          $ref: '#/components/schemas/ReviewResult'
        resultEngine:
          $ref: '#/components/schemas/ResultEngine'
        rule:
          $ref: '#/components/schemas/RuleAbbr'
        ruleId:
          $ref: '#/components/schemas/RuleId'
        ruleIds:
          type: array
          items:
            $ref: '#/components/schemas/RuleId'
        status:
          $ref: '#/components/schemas/ReviewStatusRead'
        stigs:
          type: array
          items:
            $ref: '#/components/schemas/CollectionStigWithIsDefault'
        touchTs:
          $ref: '#/components/schemas/StringDateTime'
        ts:
          $ref: '#/components/schemas/StringDateTime'
        userId:
          $ref: '#/components/schemas/UserId'
        username:
          $ref: '#/components/schemas/Username'
      required:
        - ruleId
        - ruleIds
        - result
        - detail
        - comment
        - status
        - userId
        - username
        - ts
        - touchTs
    ReviewAssetPost:
      type: object
      required:
        - ruleId
        - result
        - detail
        - comment
      additionalProperties: false
      properties:
        ruleId:
          $ref: '#/components/schemas/RuleId'
        result:
          $ref: '#/components/schemas/ReviewResult'
        resultEngine:
          $ref: '#/components/schemas/ResultEngine'
        detail:
          $ref: '#/components/schemas/CommentaryStringNullable'
        comment:
          $ref: '#/components/schemas/CommentaryStringNullable'
        autoResult:
          type: boolean
        metadata:
          $ref: '#/components/schemas/Metadata'
        status:
          $ref: '#/components/schemas/ReviewStatusWrite'
    ReviewAssetRulePatch:
      additionalProperties: false
      type: object
      minProperties: 1
      properties:
        comment:
          $ref: '#/components/schemas/CommentaryString'
        detail:
          $ref: '#/components/schemas/CommentaryString'
        metadata:
          $ref: '#/components/schemas/Metadata'
        result:
          $ref: '#/components/schemas/ReviewResult'
        resultEngine:
          $ref: '#/components/schemas/ResultEngine'
        status:
          $ref: '#/components/schemas/ReviewStatusWrite'
    ReviewAssetRulePut:
      additionalProperties: false
      type: object
      properties:
        autoResult:
          type: boolean
        comment:
          $ref: '#/components/schemas/CommentaryStringNullable'
        detail:
          $ref: '#/components/schemas/CommentaryStringNullable'
        metadata:
          $ref: '#/components/schemas/Metadata'
        result:
          $ref: '#/components/schemas/ReviewResult'
        resultEngine:
          $ref: '#/components/schemas/ResultEngine'
        status:
          $ref: '#/components/schemas/ReviewStatusWrite'
      required:
        - result
        - detail
        - comment
    ReviewAssetRuleRead:
      type: object
      properties:
        access:
          $ref: '#/components/schemas/AclRuleAccess'
        autoResult:
          type: boolean
        comment:
          $ref: '#/components/schemas/CommentaryString'
        detail:
          $ref: '#/components/schemas/CommentaryString'
        history:
          type: array
          items:
            $ref: '#/components/schemas/ReviewHistory'
        metadata:
          $ref: '#/components/schemas/Metadata'
        result:
          $ref: '#/components/schemas/ReviewResult'
        resultEngine:
          $ref: '#/components/schemas/ResultEngine'
        rule:
          $ref: '#/components/schemas/RuleAbbr'
        ruleIds:
          type: array
          items:
            $ref: '#/components/schemas/RuleId'
        status:
          $ref: '#/components/schemas/ReviewStatusRead'
        stigs:
          type: array
          items:
            $ref: '#/components/schemas/CollectionStigWithIsDefault'
        touchTs:
          $ref: '#/components/schemas/StringDateTime'
        ts:
          $ref: '#/components/schemas/StringDateTime'
        userId:
          $ref: '#/components/schemas/UserId'
        username:
          $ref: '#/components/schemas/Username'
      required:
        - access
        - result
        - detail
        - comment
        - userId
        - username
        - ts
        - status
        - touchTs
    ReviewBatch:
      additionalProperties: false
      type: object
      properties:
        action:
          $ref: '#/components/schemas/ReviewBatchAction'
        assets:
          $ref: '#/components/schemas/ReviewBatchAssetsCriteria'
        dryRun:
          default: false
          type: boolean
        rules:
          $ref: '#/components/schemas/ReviewBatchRulesCriteria'
        source:
          $ref: '#/components/schemas/ReviewBatchSource'
        updateFilters:
          type: array 
          items:
            $ref: '#/components/schemas/ReviewBatchFilter'
      required:
        - source
        - assets
        - rules
    ReviewBatchAction:
      type: string  
      enum:
        - insert
        - update
        - merge
    ReviewBatchAssetsCriteria:
      oneOf:
        - $ref: '#/components/schemas/ReviewBatchCriteria_AssetIds'
        - $ref: '#/components/schemas/ReviewBatchCriteria_BenchmarkIds'
    ReviewBatchCriteria_AssetIds:
      additionalProperties: false
      type: object
      properties:
        assetIds:
          type: array
          items:
            $ref: '#/components/schemas/AssetId'
          maxItems: 2500
          minItems: 1
          uniqueItems: true
      required:
        - assetIds
    ReviewBatchCriteria_BenchmarkIds:
      additionalProperties: false
      type: object
      properties:
        benchmarkIds:
          type: array
          items:
            $ref: '#/components/schemas/BenchmarkId'
          maxItems: 50
          minItems: 1
          uniqueItems: true
      required:
        - benchmarkIds
    ReviewBatchCriteria_RuleIds:
      additionalProperties: false
      type: object
      properties:
        ruleIds:
          type: array
          items:
            $ref: '#/components/schemas/RuleId'
          maxItems: 500
          minItems: 1
          uniqueItems: true
      required:
        - ruleIds
    ReviewBatchFilter:
      oneOf:
        - $ref: '#/components/schemas/ReviewBatchFilter_String'
        - $ref: '#/components/schemas/ReviewBatchFilter_Result'
        - $ref: '#/components/schemas/ReviewBatchFilter_Status'
        - $ref: '#/components/schemas/ReviewBatchFilter_Date'
        - $ref: '#/components/schemas/ReviewBatchFilter_User'
    ReviewBatchFilter_Date:
      additionalProperties: false
      type: object
      properties:
        condition:
          default: equals
          type: string
          enum:
            - equals
            - lessThan
            - greaterThan
        field:
          type: string
          enum:
            - ts
            - statusTs
            - touchTs
        value:
          $ref: '#/components/schemas/StringDateTime'
      required:
        - field
        - value
    ReviewBatchFilter_Result:
      additionalProperties: false
      type: object
      properties:
        condition:
          default: equals
          type: string
          enum:
            - equals
            - notequal
        field:
          type: string
          enum:
            - result
        value:
          $ref: '#/components/schemas/ReviewResult'
      required:
        - field
        - value
    ReviewBatchFilter_Status:
      additionalProperties: false
      type: object
      properties:
        condition:
          default: equals
          type: string
          enum:
            - equals
            - notequal
        field:
          type: string
          enum:
            - statusLabel
            - status
        value:
          $ref: '#/components/schemas/ReviewStatusLabel'
      required:
        - field
        - value
    ReviewBatchFilter_String:
      additionalProperties: false
      type: object
      properties:
        condition:
          default: equals
          type: string
          enum:
            - equals
            - contains
            - beginsWith
            - endsWith
        field:
          type: string
          enum:
            - detail
            - comment
            - statusText
        value:
          type: string
      required:
        - field
        - value
    ReviewBatchFilter_User:
      additionalProperties: false
      type: object
      properties:
        condition:
          default: equals
          type: string
          enum:
            - equals
            - notequal
        field:
          type: string
          enum:
            - userId
            - statusUserId
        value:
          $ref: '#/components/schemas/StringIntId'
      required:
        - field
        - value
    ReviewBatchResponse:
      additionalProperties: false
      type: object
      properties:
        failedValidation:
          type: integer
        inserted:
          type: integer
        updated:
          type: integer
        validationErrors:
          type: array
          items:
            type: object
            properties:
              assetId:
                $ref: '#/components/schemas/AssetId'
              error:
                $ref: '#/components/schemas/String255'
              ruleId:
                $ref: '#/components/schemas/RuleId'
      required:
        - inserted
        - updated
        - failedValidation
        - validationErrors
    ReviewBatchResponseDryRun:
      additionalProperties: false
      type: object
      properties:
        validationErrors:
          type: array
          items:
            type: object
            properties:
              assetId:
                $ref: '#/components/schemas/AssetId'
              error:
                $ref: '#/components/schemas/String255'
              ruleId:
                $ref: '#/components/schemas/RuleId'
        willFailValidation:
          type: integer
        willInsert:
          type: integer
        willUpdate:
          type: integer
      required:
        - willInsert
        - willUpdate
        - willFailValidation
        - validationErrors
    ReviewBatchRulesCriteria:
      oneOf:
        - $ref: '#/components/schemas/ReviewBatchCriteria_RuleIds'
        - $ref: '#/components/schemas/ReviewBatchCriteria_BenchmarkIds'
    ReviewBatchSource:
      additionalProperties: false
      type: object
      properties:
        review:
          $ref: '#/components/schemas/ReviewAssetRulePatch'
      required:
        - review
    ReviewHistory:
      additionalProperties: false
      type: object
      properties:
        autoResult:
          type: boolean
        comment:
          $ref: '#/components/schemas/CommentaryString'
        detail:
          $ref: '#/components/schemas/CommentaryString'
        result:
          $ref: '#/components/schemas/ReviewResult'
        resultEngine:
          $ref: '#/components/schemas/ResultEngine'
        ruleId:
          $ref: '#/components/schemas/RuleId'
        status:
          $ref: '#/components/schemas/ReviewStatusRead'
        touchTs:
          $ref: '#/components/schemas/StringDateTime'
        ts:
          $ref: '#/components/schemas/StringDateTime'
        userId:
          $ref: '#/components/schemas/UserId'
        username:
          $ref: '#/components/schemas/Username'
      required:
        - result
        - detail
        - comment
        - status
        - userId
        - username
        - ts
        - touchTs
        - ruleId
    ReviewHistoryAsset:
      additionalProperties: false
      type: object
      properties:
        assetId:
          $ref: '#/components/schemas/String255'
        reviewHistories:
          type: array
          items:
            $ref: '#/components/schemas/ReviewHistoryRule'
      required:
        - assetId
        - reviewHistories
    ReviewHistoryDeleted:
      additionalProperties: false
      type: object
      properties:
        HistoryEntriesDeleted:
          type: integer
      required:
        - HistoryEntriesDeleted
    ReviewHistoryRule:
      additionalProperties: false
      type: object
      properties:
        history:
          type: array
          items:
            $ref: '#/components/schemas/ReviewHistory'
        ruleId:
          $ref: '#/components/schemas/RuleId'
      required:
        - ruleId
        - history
    ReviewHistoryStats:
      additionalProperties: false
      type: object
      properties:
        assetHistoryEntryCounts:
          type: array
          items:
            $ref: '#/components/schemas/ReviewHistoryStatsAsset'
        collectionHistoryEntryCount:
          type: integer
        oldestHistoryEntryDate:
          $ref: '#/components/schemas/StringDateTime'
      required:
        - collectionHistoryEntryCount
        - oldestHistoryEntryDate
    ReviewHistoryStatsAsset:
      additionalProperties: false
      type: object
      properties:
        assetId:
          $ref: '#/components/schemas/String255'
        historyEntryCount:
          type: integer
        oldestHistoryEntry:
          nullable: true
          type: string
      required:
        - assetId
        - historyEntryCount
        - oldestHistoryEntry
    ReviewPostResponse:
      additionalProperties: false
      type: object
      properties:
        affected:
          type: object
          properties:
            inserted:
              type: number
            updated:
              type: number
        rejected:
          type: array
          items:
            type: object 
            properties:
              reason:
                $ref: '#/components/schemas/String255'
              ruleId:
                $ref: '#/components/schemas/RuleId'
      required:
        - rejected
        - affected
    ReviewRead:
      additionalProperties: false
      type: object
      properties:
        access:
          $ref: '#/components/schemas/AclRuleAccess'
        assetId:
          $ref: '#/components/schemas/StringIntId'
        assetLabelIds:
          type: array
          items:
            $ref: '#/components/schemas/LabelId'
        assetLabels:
          type: array
          items:
            $ref: '#/components/schemas/LabelBasicWithColor'
        assetName:
          $ref: '#/components/schemas/String255'
        autoResult:
          type: boolean
        comment:
          $ref: '#/components/schemas/CommentaryStringNullable'
        detail:
          $ref: '#/components/schemas/CommentaryStringNullable'
        metadata:
          $ref: '#/components/schemas/Metadata'
        result:
          $ref: '#/components/schemas/ReviewResult'
        resultEngine:
          $ref: '#/components/schemas/ResultEngine'
        rule:
          $ref: '#/components/schemas/RuleAbbr'
        ruleId:
          $ref: '#/components/schemas/RuleId'
        ruleIds:
          type: array
          items:
            $ref: '#/components/schemas/RuleId'
        status:
          $ref: '#/components/schemas/ReviewStatusRead'
        stigs:
          type: array
          items:
            $ref: '#/components/schemas/CollectionStigWithIsDefault'
        touchTs:
          $ref: '#/components/schemas/StringDateTime'
        ts:
          $ref: '#/components/schemas/StringDateTime'
        userId:
          $ref: '#/components/schemas/UserId'
        username:
          $ref: '#/components/schemas/Username'
      required:
        - assetId
        - assetName
        - ruleId
        - ruleIds
        - result
        - detail
        - comment
        - userId
        - username
        - ts
        - touchTs
        - status
    ReviewResult:
      enum:
        - fail
        - pass
        - notapplicable
        - notchecked
        - unknown
        - error
        - notselected
        - informational
        - fixed
      type: string
    ReviewStatusLabel:
      enum:
        - saved
        - submitted
        - accepted
        - rejected
      type: string
    ReviewStatusRead:
      additionalProperties: false
      type: object
      properties:
        label:
          $ref: '#/components/schemas/ReviewStatusLabel'
        text:
          $ref: '#/components/schemas/StatusText'
        ts:
          $ref: '#/components/schemas/StringDateTime'
        user:
          $ref: '#/components/schemas/UserBasic'
      required:
        - label
        - text
        - user
        - ts
    ReviewStatusOption:
      enum:
        - "null"
        - saved
        - submitted
        - accepted
      type: string
    ReviewStatusWrite:
      oneOf:
        - $ref: '#/components/schemas/ReviewStatusLabel'
        - type: object
          required:
            - label
            - text
          additionalProperties: false
          properties:
            label:
              $ref: '#/components/schemas/ReviewStatusLabel'
            text:
              $ref: '#/components/schemas/StatusText'
    Revision:
      additionalProperties: false
      type: object
      properties:
        benchmarkDate:
          $ref: '#/components/schemas/StringDateNullable'
        benchmarkId:
          $ref: '#/components/schemas/BenchmarkId'
        collectionIds:
          type: array
          items:
            $ref: '#/components/schemas/CollectionId'
        marking:
          $ref: '#/components/schemas/RevisionMarkingNullable'
        release:
          $ref: '#/components/schemas/RevisionRelease'
        revisionStr:
          $ref: '#/components/schemas/RevisionStr'
        ruleCount:
          $ref: '#/components/schemas/RuleCount'
        status:
          $ref: '#/components/schemas/RevisionStatus'
        statusDate:
          $ref: '#/components/schemas/StringDateNullable'
        version:
          $ref: '#/components/schemas/VersionString'
      required:
        - benchmarkId
        - revisionStr
        - version
        - release
        - benchmarkDate
        - status
        - statusDate
        - ruleCount
        - collectionIds
    RevisionBasic:
      additionalProperties: false
      type: object
      properties:
        benchmarkId:
          $ref: '#/components/schemas/BenchmarkId'
        revisionStr:
          $ref: '#/components/schemas/RevisionStr'
      required:
        - benchmarkId
        - revisionStr
    RevisionDate:
      $ref: '#/components/schemas/StringDate'
    RevisionMarkingNullable:
      type: string
      nullable: true
      pattern: ^CUI|U|FOUO$
    RevisionPost:
      additionalProperties: false
      type: object
      properties:
        action:
          type: string
          enum:
            - inserted
            - preserved
            - replaced
        benchmarkId:
          $ref: '#/components/schemas/BenchmarkId'
        revisionStr:
          $ref: '#/components/schemas/RevisionStr'
        marking:
          $ref: '#/components/schemas/RevisionMarkingNullable'
      required:
        - benchmarkId
        - revisionStr
        - action
    RevisionRelease:
      $ref: '#/components/schemas/String45'
    RevisionStatus:
      $ref: '#/components/schemas/String45Nullable'
    RevisionStr:
      pattern: ^(V\d{1,3}R\d{1,3}(\.\d{1,3})?|latest)$
      type: string
    RevisionStrRaw:
      pattern: ^(V\d{1,3}R\d{1,3}(\.\d{1,3})?)$
      type: string
    Roles:
      type: string
      enum: ["restricted", "full", "manage", "owner"]
    RuleAbbr:
      additionalProperties: false
      type: object
      properties:
        ruleId:
          $ref: '#/components/schemas/RuleId'
        severity:
          type: string
        title:
          $ref: '#/components/schemas/RuleTitle'
        version:
          $ref: '#/components/schemas/VersionString'
      required:
        - ruleId
        - version
        - title
        - severity
    RuleCount:
      nullable: true
      type: integer
    RuleId:
      $ref: '#/components/schemas/String45Nullable'
    RuleProjected:
      additionalProperties: false
      type: object
      properties:
        ccis:
          items:
            $ref: '#/components/schemas/CciBasic'
          type: array
        check:
          $ref: '#/components/schemas/Check'
        detail:
          additionalProperties: false
          type: object
          properties:
            documentable:
              nullable: true
              type: string
            falseNegatives:
              nullable: true
              type: string
            falsePositives:
              nullable: true
              type: string
            mitigationControl:
              nullable: true
              type: string
            mitigations:
              nullable: true
              type: string
            potentialImpacts:
              nullable: true
              type: string
            responsibility:
              nullable: true
              type: string
            severityOverrideGuidance:
              nullable: true
              type: string
            thirdPartyTools:
              nullable: true
              type: string
            vulnDiscussion:
              nullable: true
              type: string
            weight:
              nullable: true
              type: string
        fix:
          $ref: '#/components/schemas/Fix'
        groupId:
          $ref: '#/components/schemas/GroupId'
        groupTitle:
          $ref: '#/components/schemas/GroupTitle'
        ruleId:
          $ref: '#/components/schemas/RuleId'
        ruleIds:
          type: array
          items:
            $ref: '#/components/schemas/RuleId'
        severity:
          type: string
        stigs:  
          type: array
          items:
            $ref: '#/components/schemas/RevisionBasic'
        title:
          $ref: '#/components/schemas/RuleTitle'
        version:
          $ref: '#/components/schemas/VersionString'
      required:
        - ruleId
        - version
        - title
        - severity
        - groupId
        - groupTitle
    RuleSeverity:
      enum:
        - high
        - medium
        - low
        - null
      type: string
      nullable: true
    RuleTitle:
      $ref: '#/components/schemas/StringMax'
    SCAPMap:
      additionalProperties: false
      type: object
      properties:
        benchmarkId:
          $ref: '#/components/schemas/BenchmarkId'
        scapBenchmarkId:
          type: string
    STIG:
      additionalProperties: false
      type: object
      properties:
        benchmarkId:
          $ref: '#/components/schemas/BenchmarkId'
        collectionIds:
          type: array
          items:
            $ref: '#/components/schemas/CollectionId'
        lastRevisionDate:
          $ref: '#/components/schemas/StringDateNullable'
        lastRevisionStr:
          type: string
        marking:
          $ref: '#/components/schemas/RevisionMarkingNullable'
        revisionStrs:
          type: array
          items:
            $ref: '#/components/schemas/RevisionStrRaw'
        revisions:
          type: array
          items:
            $ref: '#/components/schemas/Revision'
        ruleCount:
          $ref: '#/components/schemas/RuleCount'
        status:
          $ref: '#/components/schemas/StatusText'
        title:
          $ref: '#/components/schemas/StigTitle'
      required:
        - benchmarkId
        - title
        - lastRevisionStr
        - lastRevisionDate
        - ruleCount
        - collectionIds
    State:
      type: string
      enum:
        - starting
        - available
        - unavailable
        - fail
        - stop
    StateResponse:
      type: object
      properties:
        currentState:
          $ref: '#/components/schemas/State'
        since:
          $ref: '#/components/schemas/StringDateTime'
        dependencies:
          $ref: '#/components/schemas/Dependencies'
        endpoints:
          $ref: '#/components/schemas/Endpoints'
    StatusText:
      $ref: '#/components/schemas/String511Nullable'
    StigTitle:
      $ref: '#/components/schemas/String255'
    String20:
      maxLength: 20
      type: string
    String20Nullable:
      maxLength: 20
      nullable: true
      type: string
    String255:
      maxLength: 255
      type: string
    String255Nullable:
      maxLength: 255
      nullable: true
      type: string
    String32767:
      maxLength: 32767
      type: string
    String32767Nullable:
      maxLength: 32767
      nullable: true
      type: string
    String45:
      maxLength: 45
      type: string
    String45Nullable:
      maxLength: 45
      nullable: true
      type: string
    String511Nullable:
      maxLength: 511
      nullable: true
      type: string
    StringDate:
      format: date
      type: string
    StringDateNullable:
      format: date
      nullable: true
      type: string
    StringDateTime:
      format: date-time
      type: string
    StringDateTimeNullable:
      format: date-time
      nullable: true
      type: string
    StringHexColor:
      example: aa33cc
      pattern: ^[a-fA-F0-9]{6}$
      type: string
    StringIntId:
      maxLength: 10
      minLength: 1
      pattern: ^[0-9]{1,10}$
      type: string
    StringIntIdNullable:
      nullable: true
      maxLength: 10
      minLength: 1
      pattern: ^[0-9]{1,10}$
      type: string
    StringMax:
      maxLength: 16777215
      type: string
    StringUuid:
      pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
      type: string
    StringUuidNullable:
      nullable: true
      pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
      type: string
    TextRefNist:
      $ref: '#/components/schemas/String255'
    UnreviewedAsset:
      additionalProperties: false
      type: object
      properties:
        assetId:
          $ref: '#/components/schemas/AssetId'
        labels:
          type: array
          items:
            $ref: '#/components/schemas/LabelBasic'
        name:
          $ref: '#/components/schemas/AssetName'
        unreviewed:
          type: array
          items:
            $ref: '#/components/schemas/UnreviewedAssetItem'
      required:
        - assetId
        - name
        - labels
        - unreviewed
    UnreviewedAssetItem:
      additionalProperties: false
      type: object
      properties:
        benchmarkId:
          $ref: '#/components/schemas/BenchmarkId'
        groupId:
          $ref: '#/components/schemas/GroupId'
        groupTitle:
          $ref: '#/components/schemas/GroupTitle'
        result:
          $ref: '#/components/schemas/ChecklistResultUnreviewed'
        ruleId:
          $ref: '#/components/schemas/RuleId'
        ruleTitle:
          $ref: '#/components/schemas/RuleTitle'
        severity:
          $ref: '#/components/schemas/RuleSeverity'
      required:
        - result
        - ruleId
        - groupId
        - benchmarkId
    UnreviewedRule:
      additionalProperties: false
      type: object
      properties:
        benchmarkId:
          $ref: '#/components/schemas/BenchmarkId'
        groupId:
          $ref: '#/components/schemas/GroupId'
        groupTitle:
          $ref: '#/components/schemas/GroupTitle'
        ruleId:
          $ref: '#/components/schemas/RuleId'
        ruleTitle:
          $ref: '#/components/schemas/RuleTitle'
        severity:
          $ref: '#/components/schemas/RuleSeverity'
        unreviewed:
          type: array
          items:
            $ref: '#/components/schemas/UnreviewedRuleItem'
      required:
        - ruleId
        - groupId
        - benchmarkId
        - unreviewed
    UnreviewedRuleItem:
      additionalProperties: false
      type: object
      properties:
        assetId:
          $ref: '#/components/schemas/AssetId'
        labels:
          type: array
          items:
            $ref: '#/components/schemas/LabelBasic'
        name:
          $ref: '#/components/schemas/AssetName'
        result:
          $ref: '#/components/schemas/ChecklistResultUnreviewed'
      required:
        - result
        - assetId
        - name
        - labels
    UserBasic:
      additionalProperties: false
      type: object
      properties:
        userId:
          $ref: '#/components/schemas/UserId'
        username:
          $ref: '#/components/schemas/Username'
        roleId:
          $ref: '#/components/schemas/RoleId'
      required:
        - userId
        - username
    UserBasicNullable:
      nullable: true
      additionalProperties: false
      type: object
      properties:
        userId:
          $ref: '#/components/schemas/UserIdNullable'
        username:
          $ref: '#/components/schemas/UsernameNullable'
      required:
        - userId
        - username
    UserBasicWithDisplayName:
      additionalProperties: false
      type: object
      properties:
        userId:
          $ref: '#/components/schemas/UserId'
        username:
          $ref: '#/components/schemas/Username'
        displayName:
          $ref: '#/components/schemas/DisplayName'
      required:
        - userId
        - username
        - displayName
    UserCreateOrReplace:
      additionalProperties: false
      type: object
      properties:
        collectionGrants:
          type: array
          items:
            $ref: '#/components/schemas/CollectionGrant'
          uniqueItems: true
        userGroups:
          type: array
          items:
            $ref: '#/components/schemas/UserGroupId'
          uniqueItems: true
          default: []
        username:
          $ref: '#/components/schemas/Username'
        status:
          $ref: '#/components/schemas/UserStatus'
      required:
        - username
        - collectionGrants
    UserGrant:
      type: object
      required:
        - userId
        - roleId
      properties:
        userId:
          $ref: '#/components/schemas/UserId'
        roleId:
          $ref: '#/components/schemas/RoleId'
    UserGrantProjected:
      additionalProperties: false
      type: object
      properties:
        grantId:
          $ref: '#/components/schemas/GrantId'
        roleId:
          $ref: '#/components/schemas/RoleId'
        user:
          $ref: '#/components/schemas/UserBasicWithDisplayName'
      required:
        - user
        - roleId
    UserGroup:
      type: object
      additionalProperties: false
      required:
        - userGroupId
        - name
        - description
      properties:
        userGroupId:
          $ref: '#/components/schemas/UserGroupId'
        name:
          $ref: '#/components/schemas/String255'
        description:
          $ref: '#/components/schemas/String255Nullable'
    UserGroupBasic:
      type: object
      additionalProperties: false
      required:
        - userGroupId
        - name
      properties:
        userGroupId:
          $ref: '#/components/schemas/UserGroupId'
        name:
          $ref: '#/components/schemas/String255'
        roleId:
          $ref: '#/components/schemas/RoleId'
    UserGroupCollectionGrant:
      additionalProperties: false
      type: object
      properties:
        roleId:
          $ref: '#/components/schemas/RoleId'
        collection:
          type: object
          properties:
            collectionId:
              $ref: '#/components/schemas/CollectionId'
            name:
              $ref: '#/components/schemas/CollectionName'
    UserGroupGrant:
      type: object
      required:
        - userGroupId
        - roleId
      additionalProperties: false
      properties:
        userGroupId:
          $ref: '#/components/schemas/UserGroupId'
        roleId:
          type: integer
          minimum: 1
          maximum: 4
    UserGroupGrantProjected:
      type: object
      required:
        - userGroup          
        - roleId
      additionalProperties: false
      properties:
        grantId:
          $ref: '#/components/schemas/GrantId'
        userGroup:
          $ref: '#/components/schemas/UserGroup'
        roleId:
          $ref: '#/components/schemas/RoleId'
    UserGroupId:
      $ref: '#/components/schemas/StringIntId' 
    UserGroupPatch:
      type: object
      additionalProperties: false
      minProperties: 1
      properties:
        name:
          $ref: '#/components/schemas/String255'
        description:
          $ref: '#/components/schemas/String255Nullable'
        userIds:
          type: array
          items:
            $ref: '#/components/schemas/UserId'
        collectionGrants:
          type: array
          items:
            $ref: '#/components/schemas/CollectionGrant'
          uniqueItems: true
    UserGroupProjected:
      type: object
      additionalProperties: false
      required:
        - userGroupId
        - name
        - description
      properties:
        userGroupId:
          $ref: '#/components/schemas/UserGroupId'
        name:
          $ref: '#/components/schemas/String255'
        description:
          $ref: '#/components/schemas/String255Nullable'
        users:
          type: array
          items:
            $ref: '#/components/schemas/UserBasicWithDisplayName'
        collectionGrants:
          type: array
          items:
            $ref: '#/components/schemas/UserGroupCollectionGrant'
        attributions:
          $ref: '#/components/schemas/Attributions'
    UserGroupPostOrPut:
      type: object
      additionalProperties: false
      required:
        - name
      properties:
        name:
          $ref: '#/components/schemas/String255'
        description:
          $ref: '#/components/schemas/String255Nullable'
        userIds:
          type: array
          uniqueItems: true
          items:
            $ref: '#/components/schemas/UserId'
        collectionGrants:
          type: array
          items:
            $ref: '#/components/schemas/CollectionGrant'
          uniqueItems: true
    UserId:
      $ref: '#/components/schemas/StringIntId'
    UserIdNullable:
      $ref: '#/components/schemas/StringIntIdNullable'
    UserLastAccess:
      $ref: '#/components/schemas/IntegerMinimumZeroNullable'
    UserPatch:
      additionalProperties: false
      minProperties: 1
      type: object
      properties:
        collectionGrants:
          type: array
          items:
            $ref: '#/components/schemas/CollectionGrant'
          uniqueItems: true
        userGroups:
          type: array
          items:
            $ref: '#/components/schemas/UserGroupId'
          uniqueItems: true
        username:
          $ref: '#/components/schemas/Username'
        status:
          $ref: '#/components/schemas/UserStatus'
    UserPost:
      additionalProperties: false
      type: object
      properties:
        collectionGrants:
          type: array
          items:
            $ref: '#/components/schemas/CollectionGrant'
          uniqueItems: true
        userGroups:
          type: array
          items:
            $ref: '#/components/schemas/UserGroupId'
          uniqueItems: true
        username:
          $ref: '#/components/schemas/Username'
      required:
        - collectionGrants
        - username
    UserPut:
      additionalProperties: false
      type: object
      properties:
        collectionGrants:
          type: array
          items:
            $ref: '#/components/schemas/CollectionGrant'
          uniqueItems: true
        userGroups:
          type: array
          items:
            $ref: '#/components/schemas/UserGroupId'
          uniqueItems: true
        username:
          $ref: '#/components/schemas/Username'
        status:
          $ref: '#/components/schemas/UserStatus'
      required:
        - collectionGrants
        - username
    UserPrivileges:
      type: object
      additionalProperties: false
      properties:
        admin:
          type: boolean
        create_collection:
          type: boolean
    UserProjected:
      additionalProperties: false
      type: object
      properties:
        collectionGrants:
          type: array
          items:
            $ref: '#/components/schemas/CollectionGrantProjected'
        displayName:
          $ref: '#/components/schemas/DisplayName'
        email:
          nullable: true
          type: string
        lastAccess:
          $ref: '#/components/schemas/UserLastAccess'
        privileges:
          $ref: '#/components/schemas/UserPrivileges'
        statistics:
          $ref: '#/components/schemas/UserStatistics'
        status:
          $ref: '#/components/schemas/UserStatus'
        statusDate:
          $ref: '#/components/schemas/UserStatusDate'
        statusUser:
          $ref: '#/components/schemas/UserStatusUser'
        userGroups:
          type: array
          items:
            $ref: '#/components/schemas/UserGroupBasic'
        userId:
          $ref: '#/components/schemas/UserId'
        username:
          $ref: '#/components/schemas/Username'
        webPreferences:
          $ref: '#/components/schemas/WebPreferences'
      required:
        - userId
        - username
        - displayName
        - email
        - lastAccess
    UserStatus:
      type: string
      enum:
        - available
        - unavailable
    UserStatusDate:
      $ref: '#/components/schemas/StringDateTime'
    UserStatusUser:
      $ref: '#/components/schemas/StringIntIdNullable'
    UserStatistics:
      additionalProperties: false
      type: object
      properties:
        collectionGrantCount:
          type: integer
        created:
          $ref: '#/components/schemas/Created'
        lastClaims:
          type: object
      required:
        - created
        - collectionGrantCount
        - lastClaims
    Username:
      $ref: '#/components/schemas/String255'
    UsernameNullable:
      $ref: '#/components/schemas/String255Nullable'
    WebPreferences:
      type: object
      properties:
        darkMode:
          type: boolean
        lastWhatsNew:
          type: string
          format: date
      additionalProperties: false
      required:
        - darkMode
        - lastWhatsNew
    WebPreferencesPatch:
      type: object
      properties:
        darkMode:
          type: boolean
        lastWhatsNew:
          type: string
          format: date
      additionalProperties: false
      minProperties: 1
    Version:
      description: |
        Semver as defined by the BNF at semver.org
      pattern: ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?$ 
      type: string
    VersionString:
      $ref: '#/components/schemas/String255'
  parameters:
    AppDataFormatQuery:
      name: format
      in: query
      description: The format of the appdata
      schema:
        $ref: '#/components/schemas/AppDataFormat'
    AssetIdArrayQuery:
      name: assetId
      in: query
      description: A query parameter that identifies a list of Assets
      schema:
        type: array
        uniqueItems: true
        minItems: 1
        items:
          $ref: '#/components/schemas/AssetId'
    AssetIdPath:
      name: assetId
      in: path
      description: A path parameter that identifies an Asset
      required: true
      schema:
        $ref: '#/components/schemas/AssetId'
    AssetIdQuery:
      name: assetId
      in: query
      description: A query parameter that identifies an Asset
      schema:
        $ref: '#/components/schemas/AssetId'
    AssetProjectionQuery:
      name: projection
      in: query
      description: Additional properties to include in the response.
      style: form
      explode: true
      schema:
        type: array
        uniqueItems: true
        minItems: 1
        items:
          type: string
          enum:
            - statusStats
            - stigs
    BenchmarkIdArrayQuery:
      name: benchmarkId
      in: query
      description: Filter by one or more benchmarkIds
      schema:
        type: array
        uniqueItems: true
        minItems: 1
        items:
          $ref: '#/components/schemas/BenchmarkId'
    BenchmarkIdPath:
      name: benchmarkId
      in: path
      description: A path parameter that identifies a STIG
      required: true
      schema:
        $ref: '#/components/schemas/BenchmarkId'
    BenchmarkIdQuery:
      name: benchmarkId
      in: query
      description: A query parameter that identifies a STIG
      schema:
        $ref: '#/components/schemas/BenchmarkId'
    CciProjectionQuery:
      name: projection
      in: query
      description: Additional properties to include in the response.
      style: form
      explode: true
      schema:
        type: array
        uniqueItems: true
        minItems: 1
        items:
          type: string
          enum:
            - emassAp
            - stigs
            - references
    CciQuery:
      name: cci
      in: query
      description: A query parameter that identifies a CCI
      schema:
        $ref: '#/components/schemas/CciString'
    CklModeQuery:
      name: mode
      in: query
      description: A query parameter that describes the CKL mode
      schema:
        type: string
        default: mono
        enum:
          - multi
          - mono
    CollectionIdPath:
      name: collectionId
      in: path
      description: A path parameter that identifies a Collection
      required: true
      schema:
        $ref: '#/components/schemas/CollectionId'
    CollectionIdQuery:
      name: collectionId
      required: true
      in: query
      description: A query parameter that identifies a Collection
      schema:
        $ref: '#/components/schemas/CollectionId'
    CollectionIdArrayQuery:
      name: collectionId
      required: false
      in: query
      description: Filter by one or more collectionIds
      schema:
        type: array
        uniqueItems: true
        minItems: 1
        items:
          $ref: '#/components/schemas/CollectionId'
    CollectionProjectionQuery:
      name: projection
      in: query
      description: Additional properties to include in the response.
      style: form
      explode: true
      schema:
        type: array
        uniqueItems: true
        minItems: 1
        items:
          type: string
          enum:
            - assets
            - grants
            - users
            - owners
            - statistics
            - stigs
            - labels
    CollectionsProjectionQuery:
      name: projection
      in: query
      description: Additional properties to include in the response.
      style: form
      explode: true
      schema:
        type: array
        uniqueItems: true
        minItems: 1
        items:
          type: string
          enum:
            - owners
            - statistics
    CollectionStigProjectionQuery:
      name: projection
      in: query
      description: Additional properties to include in the response.
      style: form
      explode: true
      schema:
        type: array
        uniqueItems: true
        minItems: 1
        items:
          type: string
          enum:
            - assets
    DryRunQuery:
      name: dryRun
      in: query
      description: If set to `true`, performs validation without persisting data.
      required: false
      schema:
        type: boolean
    DstCollectionIdPath:
      name: dstCollectionId
      in: path
      description: A path parameter that identifies a Collection
      required: true
      schema:
        $ref: '#/components/schemas/CollectionId'
    EndDateQuery:
      name: endDate
      in: query
      description: History entries with a timestamp after the specified end date.
      schema:
        $ref: '#/components/schemas/StringDate'
    ElevateQuery:
      name: elevate
      in: query
      description: Elevate the user context for this request if user is permitted (canAdmin)
      schema:
        type: boolean
        default: false
    FindingAggregatorQuery:
      name: aggregator
      required: true
      in: query
      description: Aggregate the findings on this property
      schema:
        type: string
        minLength: 1
        enum:
          - ruleId
          - groupId
          - cci
    FindingProjectionQuery:
      name: projection
      in: query
      description: Optional properties to return
      style: form
      explode: true
      schema:
        type: array
        uniqueItems: true
        minItems: 1
        items:
          type: string
          enum:
            - assets
            - groups
            - rules
            - stigs
            - ccis
    ForceQuery:
      name: force
      in: query
      description: Force an action, such as a delete, that would otherwise not be permitted
      schema:
        type: boolean
        default: false
    GrantIdPath:
      name: grantId
      in: path
      description: A path parameter that identifies a Grant
      required: true
      schema:
        $ref: '#/components/schemas/GrantId'
    GroupIdQuery:
      name: groupId
      in: query
      description: A query parameter that identifies a Group
      schema:
        $ref: '#/components/schemas/GroupId'
    GroupProjectionQuery:
      name: projection
      in: query
      description: Additional properties to include in the response.
      style: form
      explode: true
      schema:
        type: array
        uniqueItems: true
        minItems: 1
        items:
          type: string
          enum:
            - rules
    JobIdPath:
      name: jobId
      in: path
      description: A path parameter that identifies a Job
      required: true
      schema:
        $ref: '#/components/schemas/JobId'
    JobRunIdPath:
      name: runId
      in: path
      description: A path parameter that identifies a Job Run
      required: true
      schema:
        $ref: '#/components/schemas/JobRunId'
    TaskNamePath:
      name: taskName
      in: path
      description: A path parameter that identifies a Task by name
      required: true
      schema:
        type: string
        enum:
          - review-aging
    JsonPathQuery:
      name: jsonpath
      in: query
      description: A JSONPath expression
      schema:
        $ref: '#/components/schemas/String255'
    LabelIdPath:
      name: labelId
      in: path
      required: true
      description: A path parameter that specifies a Label
      schema:
        $ref: '#/components/schemas/LabelId'
    LabelIdQuery:
      name: labelId
      in: query
      description: Selects Assets by labelId
      schema:
        type: array
        uniqueItems: true
        minItems: 1
        items:
          $ref: '#/components/schemas/LabelId'
    LabelMatchQuery:
      name: labelMatch
      in: query
      description: Selectes Assets without labels
      schema:
        type: string
        enum:
          - 'null'
    LabelNameQuery:
      name: labelName
      in: query
      description: Selectes Assets by label name
      schema:
        type: array
        uniqueItems: true
        minItems: 1
        items:
          $ref: '#/components/schemas/LabelName'
    MetadataKeyPath:
      name: key
      in: path
      required: true
      description: A path parameter that specifies a metadata key
      schema:
        pattern: '^([\w\.]+)$'
        type: string
    MetadataQuery:
      name: metadata
      in: query
      description: A query parameter that specifies metadata key:value pairs to select matching Objects
      schema:
        type: array
        uniqueItems: true
        minItems: 1
        items:
          pattern: '^([\w\.]+:.*?)$'
          type: string
    MetricsFormatQuery:
      name: format
      in: query
      description: The format of the response body
      schema:
        type: string
        default: 'json'
        enum:
          - json
          - csv
    NameQuery:
      name: name
      in: query
      description: Matches against the name according to the `name-match` parameter
      schema:
        type: string
    NameMatchQuery:
      name: name-match
      in: query
      description: How to match against the `name` parameter
      schema:
        type: string
        default: exact
        enum:
          - exact
          - startsWith
          - endsWith
          - contains
    PoamAggregatorQuery:
      name: aggregator
      required: true
      in: query
      description: Aggregate the findings on this property
      schema:
        type: string
        enum:
          - ruleId
          - groupId
    PoamFormatQuery:
      name: format
      in: query
      description: Value for POAM format (ie. EMASS, MCCAST)
      schema:
        type: string
        enum:
          - EMASS
          - MCCAST
        default: EMASS
    PrivilegeQuery:
      name: privilege
      in: query
      description: Selects Users with the specified privilege
      schema:
        type: string
        enum:
          - admin
          - create_collection
    RetentionDateQuery:
      name: retentionDate
      in: query
      description: Delete history entries with a timestamp earlier than the specified retention date.
      required: true
      schema:
        $ref: '#/components/schemas/StringDate'
    ReviewProjectionQuery:
      name: projection
      in: query
      description: Additional properties to include in the response.
      style: form
      explode: true
      schema:
        type: array
        uniqueItems: true
        minItems: 1
        items:
          type: string
          enum:
            - metadata
            - rule
            - stigs
            - history
    ReviewHistoryStatsProjectionQuery:
      name: projection
      in: query
      description: Return review history statistics with the specified level of granularity.
      style: form
      explode: true
      schema:
        type: array
        uniqueItems: true
        minItems: 1
        items:
          type: string
          enum:
            - asset
    ReviewsProjectionQuery:
      name: projection
      in: query
      description: Additional properties to include in the response.
      style: form
      explode: true
      schema:
        type: array
        uniqueItems: true
        minItems: 1
        items:
          type: string
          enum:
            - metadata
            - rule
            - stigs
    ReviewResultQuery:
      name: result
      in: query
      schema:
        $ref: '#/components/schemas/ReviewResult'
    ReviewRulesQuery:
      name: rules
      in: query
      description: 
        default - rules from the default revision of a STIG in the Collection.<br>mapped - rules from any version of a STIG assigned to the Asset
      schema:
        type: string
        default: default-mapped
        enum:
          - all
          - default
          - default-mapped
          - mapped
          - not-default
          - not-default-mapped
          - not-mapped
    ReviewStatusQuery:
      name: status
      in: query
      schema:
        $ref: '#/components/schemas/ReviewStatusLabel'
    RevisionIdArrayQuery:
      name: revisionId
      in: query
      description: Filter by one or more revisionIds (benchmarkId-version-release)  If Revision specified is not the default rev for at least one Collection, response will be empty.
      schema:
        type: array
        uniqueItems: true
        minItems: 1
        items:
          type: string
    RevisionStrPath:
      name: revisionStr
      in: path
      description: A path parameter that identifies a STIG revision [V{version_num}R{release_num} | 'latest' ]
      required: true
      schema:
        $ref: '#/components/schemas/RevisionStr'
    RuleIdPath:
      name: ruleId
      in: path
      description: A path parameter that identifies a Rule
      required: true
      schema:
        $ref: '#/components/schemas/RuleId'
    RuleIdQuery:
      name: ruleId
      in: query
      description: Selects Reviews of a Rule
      schema:
        $ref: '#/components/schemas/RuleId'
    RuleProjectionQuery:
      name: projection
      in: query
      description: Additional properties to include in the response.
      style: form
      explode: true
      schema:
        type: array
        uniqueItems: true
        minItems: 1
        items:
          type: string
          enum:
            - detail
            - ccis
            - check
            - fix
            - ruleIds
            - stigs
    RuleSeverityQuery:
      name: severity
      in: query
      description: Selects Rules with the specified severity
      style: form
      explode: true
      schema:
        type: array
        uniqueItems: true
        minItems: 1
        maxItems: 2
        items:
          $ref: '#/components/schemas/RuleSeverity'
    RunSequenceQuery:
      name: after-seq
      in: query
      description: The starting sequence number of the run output to retrieve. If not specified, all run output is returned.
      schema:
        type: integer
        minimum: 0
    StartDateQuery:
      name: startDate
      in: query
      description: History entries with a timestamp before the specified start date.
      schema:
        $ref: '#/components/schemas/StringDate'
    StigProjectionQuery:
      name: projection
      in: query
      description: Additional properties to include in the response.
      style: form
      explode: true
      schema:
        type: array
        items:
          type: string
          enum:
            - revisions
    UnreviewedAssetsProjectionQuery:
      name: projection
      in: query
      description: Additional properties to include in the `unreviewed` objects.
      style: form
      explode: true
      schema:
        type: array
        items:
          type: string
          enum:
            - ruleTitle
            - groupTitle
    UnreviewedRulesProjectionQuery:
      name: projection
      in: query
      description: Additional properties to include in the response.
      style: form
      explode: true
      schema:
        type: array
        items:
          type: string
          enum:
            - ruleTitle
            - groupTitle
    UserGroupIdPath:
      name: userGroupId
      in: path
      description: A path parameter that identifies a User Group
      required: true
      schema:
        $ref: '#/components/schemas/UserGroupId'
    UserGroupProjectionQuery:
      name: projection
      in: query
      description: Additional properties to include in the response.
      style: form
      explode: true
      schema:
        type: array
        items:
          type: string
          enum:
            - users
            - collections
            - collectionGrants
            - attributions
    UserIdPath:
      name: userId
      in: path
      description: A path parameter that identifies a User
      required: true
      schema:
        $ref: '#/components/schemas/UserId'
    UserIdQuery:
      name: userId
      in: query
      description: A query parameter that identifies a User
      schema:
        $ref: '#/components/schemas/UserId'
    UsernameQuery:
      name: username
      in: query
      description: Matches against the username according to the `username-match` parameter
      schema:
        $ref: '#/components/schemas/Username'
    UsernameMatchQuery:
      name: username-match
      in: query
      description: How to match against the `username` parameter
      schema:
        type: string
        default: exact
        enum:
          - exact
          - startsWith
          - endsWith
          - contains
    UserStatusQuery:
      name: status
      in: query
      description: A query parameter that identifies a UserStatus
      schema:
        $ref: '#/components/schemas/UserStatus'
    UserPreferenceQuery:
      name: projection
      in: query
      description: A query parameter that identifies a UserPreference
      schema:
        type: string
        enum:
          - webPreferences
    UserProjectionQuery:
      name: projection
      in: query
      description: Additional properties to include in the response.
      style: form
      explode: true
      schema:
        type: array
        uniqueItems: true
        minItems: 1
        items:
          type: string
          enum:
            - collectionGrants
            - statistics
            - userGroups
            - webPreferences
  responses:
    Forbidden:
      description: The requesting User does not have access rights to the content
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The requested resource was not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    oauth:
      type: openIdConnect
      openIdConnectUrl: http://localhost:8080/realms/stigman/.well-known/openid-configuration
# supported oauth scopes:
# - stig-manager
# - 'stig-manager:op'
# - 'stig-manager:op:read'
# - 'stig-manager:stig'
# - 'stig-manager:stig:read'
# - 'stig-manager:collection'
# - 'stig-manager:collection:read'
# - 'stig-manager:user'
# - 'stig-manager:user:read'
