Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

patch swagger

// EXAMPLE TO PUT IN YOUR YAML 3.0.1 SWAGGER EDITOR

  /Cliente/{id_cliente}:
    patch:
      tags:
        - Cliente
      summary: Editar parâmetro do Cliente
      operationId: PAtchClienteById
      parameters:
        - name: id_cliente
          in: path
          description: ID do Cliente
          required: true
          style: simple
          explode: false
          schema:
            type: integer
            format: int64
      requestBody:
        description: Update customer with properties to be changed
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClientePropriedade'
      responses:
        "200":
          description: Cliente Editado
          content:
            application/xml:
              schema:
                $ref: "#/components/schemas/Cliente"
            application/json:
              schema:
                $ref: "#/components/schemas/Cliente"
        "400":
          description: ID inválido
        "401":
          description: Não Autorizado
        "404":
          description: Cliente não encontrado
      security:
        - bearerAuth: []
      x-codegen-request-body-name: body
      x-swagger-router-controller: Cliente

components:
  schemas:
    ClientePropriedade:
      type: object
      properties:
        morada:
          type: string
          
    Cliente:
      required:
        - id_cliente
        - nome
        - nif
        - morada
        - pontos_atuais
      type: object
      properties:
        id_cliente:
          type: integer
          format: int64
        nome:
          type: string
        nif:
          type: integer
          format: int64
        morada:
          type: string
        pontos_atuais:
          type: integer
          format: int64
      example:
        id_cliente: 6
        nome: nome
        nif: 1
        morada: morada
        pontos_atuais: 5
      xml:
        name: Cliente
Comment

PREVIOUS NEXT
Code Example
Javascript :: inline style jsx 
Javascript :: list methods of object js 
Javascript :: sum row values in datatable jquery 
Javascript :: javascript set checkbox checked based on value 
Javascript :: how to get date using tolocaledatestring 
Javascript :: find class using jquery 
Javascript :: material ui textfield error 
Javascript :: get element by 
Javascript :: javascript length 
Javascript :: javascript bind key to button 
Javascript :: google oauth logout 
Javascript :: geofencing javascript example 
Javascript :: find element with data attribute jquery 
Javascript :: regex for month 
Javascript :: angular generate module with rooting 
Javascript :: next js script tag 
Javascript :: js filter undefined from array 
Javascript :: window.onload in javascript 
Javascript :: console.time in javascript 
Javascript :: javascript find a digit in str 
Javascript :: javascript access php variable 
Javascript :: clear input field react-hook-form 
Javascript :: get id of clicked element javascript 
Javascript :: org.json.JSONException: End of input at character 0 of 
Javascript :: destructuring dynamic properties 
Javascript :: js date dd.mm.yyyy 
Javascript :: javascript detect backspace 
Javascript :: css div at bottom of div 
Javascript :: javascript parse json 
Javascript :: push input value to array javascript 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =