Skip to content

x-order require value of number to be in quotes #162

@ChandanChainani

Description

@ChandanChainani
type User struct {
  // User name
  // Extensions:
  // x-order: 0
  Username string json:"username"
  // Password
  // Extensions:
  // x-order: 1
  Password string json:"password"
}

// userInfo request payload
// swagger:response userInfo
type swaggUserInfo struct {
  // in:body
  Body User
}

Output without quotes:

userInfo:
  properties:
    password:
      type: string
      x-go-name: Password
      x-order: 1
    username:
      type: string
      x-go-name: Username
      x-order: 0
type User struct {
  // User name
  // Extensions:
  // x-order: "0"
  Username string json:"username"
  // Password
  // Extensions:
  // x-order: "1"
  Password string json:"password"
}

// userInfo request payload
// swagger:response userInfo
type swaggUserInfo struct {
  // in:body
  Body User
}

Output with quotes:

userInfo:
  properties:
    username:
      type: string
      x-go-name: Username
      x-order: 0
    password:
      type: string
      x-go-name: Password
      x-order: 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions