Feat(user): Added swagger examples
All checks were successful
ktm-booking-bot/ktm-booking-bot/pipeline/head This commit looks good
All checks were successful
ktm-booking-bot/ktm-booking-bot/pipeline/head This commit looks good
This commit is contained in:
@@ -505,22 +505,28 @@ const docTemplate = `{
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"ktmTrainCreditCard": {
|
"ktmTrainCreditCard": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"example": "1234123412341234"
|
||||||
},
|
},
|
||||||
"ktmTrainCreditCardCVV": {
|
"ktmTrainCreditCardCVV": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"example": "123"
|
||||||
},
|
},
|
||||||
"ktmTrainCreditCardExpiry": {
|
"ktmTrainCreditCardExpiry": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"example": "01/2022"
|
||||||
},
|
},
|
||||||
"ktmTrainCreditCardType": {
|
"ktmTrainCreditCardType": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"example": "Visa|Mastercard"
|
||||||
},
|
},
|
||||||
"ktmTrainPassword": {
|
"ktmTrainPassword": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"example": "password"
|
||||||
},
|
},
|
||||||
"ktmTrainUsername": {
|
"ktmTrainUsername": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"example": "user@gmail.com"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -497,22 +497,28 @@
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"ktmTrainCreditCard": {
|
"ktmTrainCreditCard": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"example": "1234123412341234"
|
||||||
},
|
},
|
||||||
"ktmTrainCreditCardCVV": {
|
"ktmTrainCreditCardCVV": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"example": "123"
|
||||||
},
|
},
|
||||||
"ktmTrainCreditCardExpiry": {
|
"ktmTrainCreditCardExpiry": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"example": "01/2022"
|
||||||
},
|
},
|
||||||
"ktmTrainCreditCardType": {
|
"ktmTrainCreditCardType": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"example": "Visa|Mastercard"
|
||||||
},
|
},
|
||||||
"ktmTrainPassword": {
|
"ktmTrainPassword": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"example": "password"
|
||||||
},
|
},
|
||||||
"ktmTrainUsername": {
|
"ktmTrainUsername": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"example": "user@gmail.com"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -80,16 +80,22 @@ definitions:
|
|||||||
user.ProfileRequest:
|
user.ProfileRequest:
|
||||||
properties:
|
properties:
|
||||||
ktmTrainCreditCard:
|
ktmTrainCreditCard:
|
||||||
|
example: "1234123412341234"
|
||||||
type: string
|
type: string
|
||||||
ktmTrainCreditCardCVV:
|
ktmTrainCreditCardCVV:
|
||||||
|
example: "123"
|
||||||
type: string
|
type: string
|
||||||
ktmTrainCreditCardExpiry:
|
ktmTrainCreditCardExpiry:
|
||||||
|
example: 01/2022
|
||||||
type: string
|
type: string
|
||||||
ktmTrainCreditCardType:
|
ktmTrainCreditCardType:
|
||||||
|
example: Visa|Mastercard
|
||||||
type: string
|
type: string
|
||||||
ktmTrainPassword:
|
ktmTrainPassword:
|
||||||
|
example: password
|
||||||
type: string
|
type: string
|
||||||
ktmTrainUsername:
|
ktmTrainUsername:
|
||||||
|
example: user@gmail.com
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
user.ProfileResponse:
|
user.ProfileResponse:
|
||||||
|
|||||||
@@ -22,12 +22,12 @@ type Profile struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ProfileRequest struct {
|
type ProfileRequest struct {
|
||||||
KtmTrainUsername string `json:"ktmTrainUsername"`
|
KtmTrainUsername string `json:"ktmTrainUsername" swaggertype:"string" example:"user@gmail.com"`
|
||||||
KtmTrainPassword string `json:"ktmTrainPassword"`
|
KtmTrainPassword string `json:"ktmTrainPassword" swaggertype:"string" example:"password"`
|
||||||
KtmTrainCreditCardType string `json:"ktmTrainCreditCardType"`
|
KtmTrainCreditCardType string `json:"ktmTrainCreditCardType" swaggertype:"string" example:"Visa|Mastercard"`
|
||||||
KtmTrainCreditCard string `json:"ktmTrainCreditCard"`
|
KtmTrainCreditCard string `json:"ktmTrainCreditCard" swaggertype:"string" example:"1234123412341234"`
|
||||||
KtmTrainCreditCardExpiry string `json:"ktmTrainCreditCardExpiry"`
|
KtmTrainCreditCardExpiry string `json:"ktmTrainCreditCardExpiry" swaggertype:"string" example:"01/2022"`
|
||||||
KtmTrainCreditCardCVV string `json:"ktmTrainCreditCardCVV"`
|
KtmTrainCreditCardCVV string `json:"ktmTrainCreditCardCVV" swaggertype:"string" example:"123"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ProfileResponse struct {
|
type ProfileResponse struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user