when i compare my stuff with your pet application i can't see the difference
| Q | A
| ----------------------------------- | -------
| Bug or feature request? | bug
| Which Swagger/OpenAPI version? | swagger 20
| Which Swagger-Editor version? | current : downloaded from github yesterday
| How did you install Swagger-Editor? | npm
| Which broswer & version? | vivaldi
| Which operating system? | windows7
swagger: '2.0'
info:
description: This is a TFMS server.
version: 1.0.0
title: TFMS Public Services
termsOfService: 'http://avl.com/tfms/terms/'
contact:
email: [email protected]
license:
name: AVL license
url: 'http://www.avl.com/'
host: petstore.swagger.io
basePath: /v2
tags:
- name: TFMS
description: Testfield Management Services
externalDocs:
description: Find out more
url: 'http://tfms.com'
- name: search
description: Search operations
- name: masterdata
description: Operations on masterdata tables
externalDocs:
description: Find out more about our store
url: 'http://swagger.io'
- name: testequipment
description: Operations about testequipment instances
externalDocs:
description: Find out more about our store
url: 'http://swagger.io'
- name: testorder
description: Operations about testorders
externalDocs:
description: Find out more about our store
url: 'http://swagger.io'
- name: calibration
description: Operations about calibrations of objects
externalDocs:
description: Find out more about our store
url: 'http://swagger.io'
- name: maintenance
description: Operations about maintenances of objects
- name: pet
description: obsolete
externalDocs:
description: Find out more about our store
url: 'http://swagger.io'
schemes:
- http
paths:
/search:
get:
tags:
- search
summary: central search using paco query
description: allows to search for all businessobjects
operationId: searchByDefaultQuery
produces:
- application/xml
- application/json
parameters:
- name: criteria
type: string
in: query
required: true
- name: attributes
type: string
in: query
required: false
responses:
'200':
description: successful operation
schema:
type: array
items:
$ref: '#/definitions/Reference'
/search/mongoQuery:
get:
tags:
- search
summary: search for objects using a valid mongo statement
description: allows to search for all businessobjects using mongo statements
operationId: searchByMongo
produces:
- application/xml
- application/json
parameters:
- name: criteria
in: query
type: string
required: true
responses:
'200':
description: successful operation
schema:
type: array
items:
$ref: '#/definitions/Reference'
/search/tfmsQuery:
get:
tags:
- search
summary: central search using paco query
description: allows to search for all businessobjects using mongo statements
operationId: searchByPacoQuery
produces:
- application/xml
- application/json
parameters:
- name: criteria
in: query
type: string
required: true
- name: attributes
in: query
type: string
required: false
responses:
'200':
description: successful operation
schema:
type: array
items:
$ref: '#/definitions/Reference'
/masterdata:
get:
tags:
- masterdata
summary: returns all table names + uri's (singular name in contact)
responses:
'200':
description: successful operation
schema:
type: array
items:
$ref: '#/definitions/Reference'
/masterdata/{recordType}:
get:
tags:
- masterdata
summary: return table records (paginated)
parameters:
- name: recordType
in: path
required: true
type: string
decription: not the plural table name but singular type name of record
- name: pageSize
in: query
type: int
required: false
decription: records in one page
- name: page
in: query
type: int
required: false
decription: requested page
- name: sort
in: query
type: string
required: false
decription: could be columname:1,columnname:-1,..
- name: filter
in: query
type: string
required: false
decription: could be columname:filter1,columnname:filter2,..
responses:
'200':
description: successful operation
schema:
type: array
items:
$ref: '#/definitions/Record'
'404':
description: not found
put:
tags:
- masterdata
summary: updates, deletes, adds records in bulk operations
responses:
'200':
description: successful operation
/web/masterdata:
get:
tags:
- masterdata
summary: UI method for update attribute / script on a single record
parameters:
- name: attributeName
in: body
type: string
required: true
- name: recordObj
in: body
required: true
responses:
'200':
description: successful operation + update record
/testequipment:
get:
tags:
- testequipment
summary: returns all testequipments in store (conflicts a kind of with search)
responses:
'200':
description: successfull
post:
tags:
- testequipment
summary: adds a testequipments into store, expects full objects
parameters:
- name: testequipmentObj
in : body
required: true
responses:
'200':
description: successfull + new Id / + new Uri
'/testequipment/{tfmsId}':
get:
tags:
- testequipment
summary: returns testequipment with given id (maintenance, calibration etc. not part of object, only uri's to related list of maintenances, one uri per maintenanceType)
parameters:
- name: tfmsId
in: path
required: true
type: integer
format: int64
responses:
'200':
description: successfull
put:
tags:
- testequipment
summary: updates testequipment
responses:
'200':
description: successfull
delete:
tags:
- testequipment
summary: deletes testequipment
responses:
'200':
description: successfull
patch:
tags:
- testequipment
summary: partially updates testequipment
responses:
'200':
description: successfull
/web/testequipment:
post:
tag:
- testequipment
summary: create method for WebUI, only tet is mandatory, returns id + uri to newly created object
get:
tag:
- testequipment
summary: send partial updates, server merges, validates, does some logic, returns delta back, DOES NOT SAVE
/testorder:
get:
tags:
- testorder
summary: returns all testorders in store
responses:
'200':
description: successfull
post:
tags:
- testorder
summary: adds a testorder into store
responses:
'200':
description: successfull
'/testorder/{tfmsId}':
get:
tags:
- testorder
summary: return one testorder (?without steps only links to steps?)
parameters:
- name: tfmsId
in: path
required: true
type: integer
format: int64
responses:
'200':
description: successfull
put:
tags:
- testorder
summary: updates one testorder
responses:
'200':
description: successfull
delete:
tags:
- testorder
summary: deletes on testorder
responses:
'200':
description: successfull
/step:
get:
tags:
- testorder
summary: dedicated endpoint for steps. we are not sure if this is good, due to validation issues. it might make sense to have this only for UI-REST
/web/testorder:
get:
tags:
- testorder
summary: UI testorder without step detail - information
/web/step:
get:
tags:
- testorder
summary: UI endpoint to load (and save ?) step separately
/maintenance:
get:
tags:
- maintenance
summary: returns filtered maintenances in store
parameters:
- name: resourceId
in: query
required: true
- name: maintenanceTypeName
in : query
type: string
required: false
- name: position
in : query
type: string
description: last / all / specific index
required: false
responses:
'200':
description: successfull
post:
tags:
- maintenance
summary: stores a new maintenance, as content we need maintenanceTypeName and resourceId
parameters:
- name: maintenaceObj
in: body
required: true
responses:
'200':
description: successfull
'/maintenance/{maintenanceId}':
get:
tags:
- maintenance
summary: returns all maintenances of given object
parameters:
- name: maintenanceId
in: path
required: true
type: integer
format: int64
responses:
'200':
description: successfull
put:
tags:
- maintenance
summary: update existing maintenance (info which one is needed)
responses:
'200':
description: successfull
delete:
tags:
- maintenance
summary: delete existing maintenance (info which one is needed)
responses:
'200':
description: successfull
'/maintenance/add':
get:
tags:
- maintenance
summary: 'UI/client helper: returns a prefilled maintenance (for a later post)'
parameters:
- name: resourceId
in: query
required: true
- name: maintenanceTypeName
in : query
type: string
required: true
responses:
'200':
description: successfull
/calibration:
get:
tags:
- calibration
summary:
parameters:
- name: resourceId
in: query
required: true
- name: channelName
in : query
type: string
required: true
description:
- name: calibrationTypeName
in : query
type: string
description: in case we habe multiple calibrations with different intervals
required: false
- name: position
in : query
type: string
description: last / all / specific index
required: false
responses:
'200':
description: successfull
securityDefinitions:
tfms_auth:
type: oauth2
authorizationUrl: 'http://tfms.avl.com/session/dialog'
flow: implicit
scopes:
'write:pets': modify pets in your account
'read:pets': read your pets
api_key:
type: apiKey
name: api_key
in: header
definitions:
Reference:
type: object
required:
- id
- name
- type
- uri
properties:
id:
type: integer
format: int64
example: 125643
type:
type: string
example: TestOrder
name:
type: string
example: doggie
uri:
type: string
state:
type: string
description: resource state in the store
enum:
- available
- created
- closed
xml:
name: TfmsReference
Record:
type: object
required:
- id
- name
- type
- uri
properties:
id:
type: integer
format: int64
example: 125643
type:
type: string
example: Contact
name:
type: string
example: AVL
xml:
name: Record
Order:
type: object
properties:
id:
type: integer
format: int64
petId:
type: integer
format: int64
quantity:
type: integer
format: int32
shipDate:
type: string
format: date-time
status:
type: string
description: Order Status
enum:
- placed
- approved
- delivered
complete:
type: boolean
default: false
xml:
name: Order
Category:
type: object
properties:
id:
type: integer
format: int64
name:
type: string
xml:
name: Category
User:
type: object
properties:
id:
type: integer
format: int64
username:
type: string
firstName:
type: string
lastName:
type: string
email:
type: string
password:
type: string
phone:
type: string
userStatus:
type: integer
format: int32
description: User Status
xml:
name: User
Tag:
type: object
properties:
id:
type: integer
format: int64
name:
type: string
xml:
name: Tag
ApiResponse:
type: object
properties:
code:
type: integer
format: int32
type:
type: string
message:
type: string
externalDocs:
description: Find out more about Swagger
url: 'http://swagger.io'
{
"your": { "constructorConfig": "here" }
}
?yourQueryStringConfig=here
no error ;-)
it shows error that i find not reasonable
@PawelSpoon, please format your spec as a code block so that indentation is preserved. Just put three backticks ``` before and after the spec code.
done.
i did not paste this from swagger editor but visual code.
the leading char might be wrong. in such cases i do replace the first line: swagger:
with the line that generates swagger editor as pet example
thanks a lot !
Typos:
type: int -> type: integer
decription -> description
tag -> tags
Some summary and description fields don't have a value
Some body parameters are missing a schema
Some query parameters are missing a type
Some operations are missing responses
/web/masterdata - you cannot have more than one body parameter
Please refer to our guide on how to write API definitions -
https://swagger.io/docs/specification/2-0/basic-structure/
Thanks a lot!
And sorry
The error messages are truly misleading.
Do you know a good validator with usefull errormessages?
Best Regards
Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail gesendet.Am 06.10.17, 11:34, Helen Kosova notifications@github.com schrieb:
Typos:
type: int -> type: integer
decription -> description
tag -> tags
description: could be columname:1,columnname:-1,..
-> strings containing : need to be wrapped in quotes:
description: 'could be columname:1,columnname:-1,..'
Some summary and description fields don't have a value
Some body parameters are missing a schema
Some query parameters are missing a type
Some operations are missing responses
/web/masterdata - you cannot have more than one body parameter
Please refer to our guide on how to write API definitions -
https://swagger.io/docs/specification/2-0/basic-structure/
鈥擸ou are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.
{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/swagger-api/swagger-editor","title":"swagger-api/swagger-editor","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/swagger-api/swagger-editor"}},"updates":{"snippets":[{"icon":"PERSON","message":"@hkosova in #1521: Typos:\r\ntype: int -\u003e type: integer\r\ndecription -\u003e description\r\ntag -\u003e tags\r\n\r\ndescription: could be columname:1,columnname:-1,..\r\n-\u003e strings containing : need to be wrapped in quotes:\r\ndescription: 'could be columname:1,columnname:-1,..'\r\n\r\nSome summary and description fields don't have a value\r\nSome body parameters are missing a schema\r\nSome query parameters are missing a type\r\nSome operations are missing responses\r\n\r\n/web/masterdata - you cannot have more than one body parameter\r\n\r\nPlease refer to our guide on how to write API definitions -\r\nhttps://swagger.io/docs/specification/2-0/basic-structure/"}],"action":{"name":"View Issue","url":"https://github.com/swagger-api/swagger-editor/issues/1521#issuecomment-334706890"}}}
fixed all, sorry and thanks
@PawelSpoon Did you find an editor with useful error messages? I'm currently dealing with the same problems. This reminds me of debugging JavaScript back in the IE days when any error would be blamed on the first semicolon in your document 馃ぃ
@mroach fwiw, fixing and improving the error messages is a high priority for us, hopefully would have a major improvement within a couple of weeks.
Most helpful comment
Typos:
type: int->type: integerdecription->descriptiontag->tagsSome
summaryanddescriptionfields don't have a valueSome body parameters are missing a
schemaSome query parameters are missing a
typeSome operations are missing
responses/web/masterdata- you cannot have more than one body parameterPlease refer to our guide on how to write API definitions -
https://swagger.io/docs/specification/2-0/basic-structure/