meilisearch / meilisearch-dart

The Meilisearch API client written for Dart
https://meilisearch.com
MIT License
81 stars 26 forks source link

`updateKey` can only updates description and name #309

Closed ahmednfwela closed 1 year ago

ahmednfwela commented 1 year ago

according to the spec it supports more

  '/keys/{uid_or_key}':
    patch:
      summary: Update an API key specified by its uid or key field.
      operationId: keys.update
      tags:
        - Keys
      security:
        - apiKey: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/key'
              examples:
                Patch an API Key Response:
                  value:
                    uid: 01b4bc42-eb33-4041-b481-254d00cce834
                    key: d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4
                    name: Indexing Products API key
                    description: null
                    actions:
                      - documents.add
                    indexes:
                      - products
                    expiresAt: '2021-11-13T00:00:00Z'
                    createdAt: '2021-11-12T10:00:00Z'
                    updatedAt: '2021-11-12T15:00:00Z'
      parameters:
        - $ref: '#/components/parameters/Content-Type'
      description: Update an API Key
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type:
                    - string
                    - 'null'
                description:
                  type:
                    - string
                    - 'null'
              additionalProperties: false
            examples:
              Patch an API Key Request:
                value:
                  description: Indexing Products API key

@brunoocasali is this intended behavior ?

Edit: nvm it doesn't support more