ROOTPLOIT
Server: LiteSpeed
System: Linux in-mum-web1878.main-hosting.eu 5.14.0-570.21.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 11 07:22:35 EDT 2025 x86_64
User: u435929562 (435929562)
PHP: 7.4.33
Disabled: system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: //opt/go/pkg/mod/github.com/go-openapi/[email protected]/fixtures/widget-crud.yml
---
swagger: '2.0'
info:
  title: widget CRUD API
  version: 4.2.0
schemes:
  - http
basePath: /api
consumes:
  - application/json
produces:
  - application/json
securityDefinitions:
  myRoles:
    description: definition of scopes as roles
    type: oauth2
    flow: accessCode 
    authorizationUrl: https://foo.bar.com/authorize
    tokenUrl: https://foo.bar.com/token
    scopes:
      sellers: group of sellers
      buyers: group of buyers
  myPrimaryAPIKey:
    type: apiKey
    name: X-primaryApiKey
    in: header
  myBasicAuth:
    type: basic
    description: basic primary auth
security:
  - myPrimaryAPIKey: []
  - 
    myBasicAuth: []
    myRoles: [ sellers ]
  - 
    myBasicAuth: []
tags:
  - name: conflict
    description: a tag in conflict with primary spec
paths:
  /common:
    get:
      operationId: commonGet
      summary: here to test path collisons
      responses:
        '200':
          description: OK
          schema:
            $ref: "#/definitions/widget"

  /widgets:
    post:
      operationId: create
      summary: Create a new widget
      parameters:
        - name: info
          in: body
          schema:
            $ref: "#/definitions/widget"
      responses:
        '201':
          description: created
          schema:
            $ref: "#/definitions/widgetId"
        default:
          description: error
          schema:
            $ref: "#/definitions/error"
  /widgets/{widgetid}:
    get:
      operationId: get
      summary: Get a widget by id
      parameters:
        - $ref: "#/parameters/widgetid"
      responses:
        '200':
          description: OK
          schema:
            $ref: "#/definitions/widget"
        '401':
          $ref: "#/responses/401"
        '404':
          $ref: "#/responses/404"
        default:
          description: error
          schema:
            $ref: "#/definitions/error"
    delete:
      operationId: delete
      summary: delete a widget by id
      parameters:
        - name: widgetid
          in: path
          required: true
          type: string
      responses:
        '200':
          description: OK
        '401':
          description: unauthorized
          schema:
            $ref: "#/definitions/error"
        '404':
          description: resource not found
          schema:
            $ref: "#/definitions/error"
        default:
          description: error
          schema:
            $ref: "#/definitions/error"
    post:
      operationId: update
      summary: update a widget by id
      parameters:
        - name: widgetid
          in: path
          required: true
          type: string
        - name: info
          in: body
          schema:
            $ref: "#/definitions/widget"
      responses:
        '200':
          description: OK
        '401':
          description: unauthorized
          schema:
            $ref: "#/definitions/error"
        '404':
          description: resource not found
          schema:
            $ref: "#/definitions/error"
        default:
          description: error
          schema:
            $ref: "#/definitions/error"

definitions:
  common:
    type: object
    required:
      - id
    properties:
      id:
        type: string
        format: string
        minLength: 1
  widget:
    type: object
    required:
      - name
      - description
    properties:
      id:
        type: string
        format: string
        readOnly: true
      name:
        type: string
        format: string
        minLength: 1
      description:
        type: string
        format: string
        minLength: 1
  widgetId:
    type: object
    required:
      - id
    properties:
      id:
        type: string
        format: string
        minLength: 1
  error:
    type: object
    required:
       - message
    properties:
      code:
        type: string
        format: string
      message:
        type: string
      fields:
        type: string

parameters:
  common:
    name: common
    in: query
    type: string
  widgetid:
    name: widgetid
    in: path
    required: true
    type: string

responses:
  401:
    description: widget unauthorized
    schema:
      $ref: "#/definitions/error"
  404:
    description: widget resource not found
    schema:
      $ref: "#/definitions/error"