swagger: fixed invalid specification (#5485)

Currently, the swagger spec doesn't follow the Swagger 2.0 specification. So, I facing 4 errors when trying generate the Golang client for chatwoot.
Due to the spec, the binary field should use format: binary beside type: string

Signed-off-by: Giau. Tran Minh <hello@giautm.dev>
Co-authored-by: Sojan Jose <sojan@pepalo.com>
This commit is contained in:
Giau. Tran Minh
2023-02-16 14:17:26 +02:00
committed by GitHub
parent 8c49a2efc5
commit 59964a4f41
7 changed files with 10 additions and 40 deletions

View File

@@ -158,13 +158,6 @@ conversation_status_toggle:
conversation_labels:
$ref: ./resource/extension/conversation/labels.yml
## message
extended_message:
allOf:
- $ref: '#/definitions/generic_id'
- $ref: '#/definitions/message'
- $ref: ./resource/extension/message/with_source_sender.yml
## report
account_summary:

View File

@@ -14,7 +14,8 @@ properties:
type: string
description: phone number of the contact
avatar:
type: string <binary>
type: string
format: binary
description: Send the form data with the avatar image binary or use the avatar_url
avatar_url:
type: string

View File

@@ -10,7 +10,8 @@ properties:
type: string
description: phone number of the contact
avatar:
type: string <binary>
type: string
format: binary
description: Send the form data with the avatar image binary or use the avatar_url
avatar_url:
type: string

View File

@@ -1,5 +1,4 @@
type: object
allOf:
- $ref: '#/definitions/generic_id'
- $ref: '#/definitions/conversation'
- $ref: '../contact/conversation.yml'

View File

@@ -2,5 +2,3 @@ type: object
properties:
source_id:
type: number
sender:
type: object