Re: Schema error
Yes i did, i solved the problem by adding type:string after (required:true) field...let me know if this works for you On Thursday, February 1, 2018 at 11:25:25 PM UTC+1, Remi Adebayo wrote: > > been getting this error > Schema error at paths['/homepage/postreview'].post.parameters[0].inshould be > equal to one of the allowed values > allowedValues: body > Jump to line 71 > Schema error at paths['/homepage/postreview'].post.parameters[0]should NOT > have additional properties > additionalProperty: in, name, description, required > Jump to line 71 > > this is my code > > /homepage/postreview: > post: > tags: > - "homepage" > summary: "to post review" > description: "comment your review" > operationId: "postReview" > consumes: > - "application/json" > produces: > - "application/json" > parameters: line 71 > - in: "query" > name: "review" > description: "enter your review" > required: true > responses: > 403: > description: "cannot post a blank review" > > -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Schema error
Hi, Did you find how to solve this? I am also facing the same problem. On Friday, February 2, 2018 at 3:55:25 AM UTC+5:30, Remi Adebayo wrote: > > been getting this error > Schema error at paths['/homepage/postreview'].post.parameters[0].inshould be > equal to one of the allowed values > allowedValues: body > Jump to line 71 > Schema error at paths['/homepage/postreview'].post.parameters[0]should NOT > have additional properties > additionalProperty: in, name, description, required > Jump to line 71 > > this is my code > > /homepage/postreview: > post: > tags: > - "homepage" > summary: "to post review" > description: "comment your review" > operationId: "postReview" > consumes: > - "application/json" > produces: > - "application/json" > parameters: line 71 > - in: "query" > name: "review" > description: "enter your review" > required: true > responses: > 403: > description: "cannot post a blank review" > > -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Schema error should NOT have additional properties additionalProperty: @odata.context, @odata.etag
required: true schema: $ref: "#/definitions/User" responses: "200": description: OK schema: $ref: "#/definitions/GeneralResponse" default: description: Error schema: $ref: "#/definitions/ErrorResponse" /swagger: x-swagger-pipe: swagger_raw # complex objects have schema definitions definitions: Schema: properties: key: type: string value: type: string User: required: - sourcename - sourceId - sourceType properties: sourcename: type: string sourceId: type: string sourceDescription: type: string sourceType: type: string sourceSchema: type: object additionalProperties: type: string GeneralResponse: type: object properties: success: type: number description: returns 1 if successful description: type: string description: a short comment required: - success - description ErrorResponse: required: - message properties: message: type: string On Tuesday, October 31, 2017 at 12:54:51 AM UTC+5:30, Ron wrote: > > Valid JSON doesn’t mean it’s a valid OpenAPI document. > > In order to point you to the issue, we need to see the full definition. > > > > > > > > *From: *<swagger-sw...@googlegroups.com > on behalf of Vinay > Banakar <vinay.s...@gmail.com > > *Reply-To: *"swagger-sw...@googlegroups.com " < > swagger-sw...@googlegroups.com > > *Date: *Monday, October 30, 2017 at 01:28 > *To: *Swagger <swagger-sw...@googlegroups.com > > *Subject: *Schema error should NOT have additional properties > additionalProperty: @odata.context, @odata.etag > > > > > Hello, > > I am using http://editor.swagger.io, wheere I have a validated JSON file > I am trying to create a pojo of it. But when I copy the json to the editor > it prompts me to convert it to YAML, once that's done the editor throws the > bellow error. > Schema error > > should NOT have additional properties > > additionalProperty: @odata.context, @odata.etag, @odata.id, @odata.type > > But it is a valid JSON data, can someone help me figure out why I am > encountering this error to beign with? > > Thank you > > -- > You received this message because you are subscribed to the Google Groups > "Swagger" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to swagger-swaggersocket+unsubscr...@googlegroups.com . > For more options, visit https://groups.google.com/d/optout. > > -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Schema error
been getting this error Schema error at paths['/homepage/postreview'].post.parameters[0].inshould be equal to one of the allowed values allowedValues: body Jump to line 71 Schema error at paths['/homepage/postreview'].post.parameters[0]should NOT have additional properties additionalProperty: in, name, description, required Jump to line 71 this is my code /homepage/postreview: post: tags: - "homepage" summary: "to post review" description: "comment your review" operationId: "postReview" consumes: - "application/json" produces: - "application/json" parameters: line 71 - in: "query" name: "review" description: "enter your review" required: true responses: 403: description: "cannot post a blank review" -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Schema error
YAML is sensitive to indentation. >From what you shared it seems like a lot is misplaced or poorly indented. The error actually tells you which keywords cannot exist under the root, hinting you what’s not indented properly. Another point – paths must begin with a ‘/’. From: <swagger-swaggersocket@googlegroups.com> on behalf of Olympacs <dminesas2...@gmail.com> Reply-To: "swagger-swaggersocket@googlegroups.com" <swagger-swaggersocket@googlegroups.com> Date: Saturday, September 16, 2017 at 03:04 To: Swagger <swagger-swaggersocket@googlegroups.com> Subject: Re: Schema error I have just edited the entire code referring to the docs. I am still getting the errors. Errors Hide Schema error should NOT have additional properties additionalProperty: get, datasets/{opec}, -in, database_code, type, required, description, responses:1, path, datasets/{opec}/{orb} Jump to line 0 Schema error at paths should be object Jump to line 0 On Friday, September 15, 2017 at 6:03:33 AM UTC-4, Ron wrote: Hello, The validation errors pretty much tell you what you’re doing wrong. Please follow the documentation to learn about the structure of an API definition and take it from there. https://swagger.io/docs/specification/2-0/basic-structure/ From: <swagger-sw...@googlegroups.com> on behalf of olympacs <dmines...@gmail.com> Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com> Date: Thursday, September 14, 2017 at 22:21 To: Swagger <swagger-sw...@googlegroups.com> Subject: Re: Schema error I am attaching the code On Thursday, September 14, 2017 at 3:20:54 PM UTC-4, Olympacs wrote: I am working on an existing api. Once it loads it shows a set of errors. I googled online but found similar errors when creating api's from scratch when you require path parameters. Please advise. Errors Hide Schema error should NOT have additional properties additionalProperty: dataset Jump to line 0 Schema error should have required property 'info' missingProperty: info Jump to line 0 Schema error should have required property 'paths' missingProperty: paths Jump to line 0 -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Schema error
I have just edited the entire code referring to the docs. I am still getting the errors. ErrorsHide Schema error should NOT have additional properties additionalProperty: get, datasets/{opec}, -in, database_code, type, required, description, responses:1, path, datasets/{opec}/{orb} Jump to line 0 Schema error at pathsshould be object Jump to line 0 On Friday, September 15, 2017 at 6:03:33 AM UTC-4, Ron wrote: > > Hello, > > > > The validation errors pretty much tell you what you’re doing wrong. > > Please follow the documentation to learn about the structure of an API > definition and take it from there. > > https://swagger.io/docs/specification/2-0/basic-structure/ > > > > > > > > > > *From: *<swagger-sw...@googlegroups.com > on behalf of > olympacs <dmines...@gmail.com > > *Reply-To: *"swagger-sw...@googlegroups.com " < > swagger-sw...@googlegroups.com > > *Date: *Thursday, September 14, 2017 at 22:21 > *To: *Swagger <swagger-sw...@googlegroups.com > > *Subject: *Re: Schema error > > > > I am attaching the code > > On Thursday, September 14, 2017 at 3:20:54 PM UTC-4, Olympacs wrote: > > I am working on an existing api. Once it loads it shows a set of errors. I > googled online but found similar errors when creating api's from scratch > when you require path parameters. Please advise. > Errors > > Hide > > Schema error > > should NOT have additional properties > > additionalProperty: dataset > > Jump to line 0 > > Schema error > > should have required property 'info' > > missingProperty: info > > Jump to line 0 > > Schema error > > should have required property 'paths' > > missingProperty: paths > > Jump to line 0 > > -- > You received this message because you are subscribed to the Google Groups > "Swagger" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to swagger-swaggersocket+unsubscr...@googlegroups.com . > For more options, visit https://groups.google.com/d/optout. > > -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Schema error
I am attaching the code On Thursday, September 14, 2017 at 3:20:54 PM UTC-4, Olympacs wrote: > > I am working on an existing api. Once it loads it shows a set of errors. I > googled online but found similar errors when creating api's from scratch > when you require path parameters. Please advise. > > ErrorsHide > Schema error should NOT have additional properties > additionalProperty: dataset > Jump to line 0 > Schema error should have required property 'info' > missingProperty: info > Jump to line 0 > Schema error should have required property 'paths' > missingProperty: paths > Jump to line 0 > > -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Schema error
I am working on a quandl api. when imported the api loads and is automatically shows the following errors. Any suggestions. I googled the problem but ones I encountered are from creating the api from scatch requiring a path parameter. ErrorsHide Schema error should NOT have additional properties additionalProperty: dataset Jump to line 0 Schema error should have required property 'info' missingProperty: info Jump to line 0 Schema error should have required property 'paths' missingProperty: paths Jump to line 0 -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Schema error
Hello, Please I am new to swagger. Kindly help me resolve the error below. Thank you Schema error at parametersshould be a object NB: please the Schema error is at where the text is highlighted red swagger: '2.0' info: description: This is a simple API version: 1.0.0 title: SMS API host: readme.io paths: /v3/messages: post: description: API Reference responses: 200: description: successful parameters: - name: MessageId in: query description: Unique Id for each message required: true type: string - name: From in: query description: The sender of the message required: true type: string - name: To in: query description: Recipient of the message required: true type: string - name: content in: query description: The message being sent to the recipient required: true type: text - name: From in: query description: The sender of the message required: true type: string - name: To in: query description: Recipient of the message required: true type: string - name: content in: query description: The message being sent to the recipient required: true type: text -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Swagger: Schema Error on PUT
I keep getting a failed schema validation error on a successful response using swagger. However, I'm pretty sure my syntax is correct. Any ideas on what is going wrong here? My controller function putAReview(req, res){ fakeDB.addReview(req.body.reviewObject.id, req.body.reviewObject.reviewInteger) .then( res => { res.json({result: {result: res}}); //Outputs : { result: { result: 'success' } } }) .catch( err =>{ res.status(500).json({error: {error: err}}); }); } My route (YAML) /review: x-swagger-router-controller: wine put: operationId: putAReview description: Review a wine based on ID parameters: - name: reviewObject description: The ID and review integer of the wine to review in: body required: true schema: $ref: "#/definitions/ReviewWineByID" # define the type of response for Success "200" and Error responses: "200": description: Success schema: $ref: "#/definitions/ReviewWineByIDResponse" default: description: Error schema: $ref: "#/definitions/ReviewWineByIDErrorResponse" My schema ReviewWineByIDResponse: required: - result properties: result: type: object properties: result: type: string -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.