{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • Apigee-127 /
avatar image
0
Question by Hung Vo · Oct 13, 2014 at 10:47 PM · 3.6k Views OpenAPI - Swagger Spec

a127 swagger editor, parameters type: file

Following the swagger specs, I am trying to load a data file.

- parameters

- name: file

in: formData

description: data file

required: true

type: file

consumes:

- multipart/form-data

The a127 swagger editor is rejecting "type: file" with error:

Data does not match any schemas from "oneOf" at paths ▹ /orgs/{orgID]/data/{fileName} ▹ post ▹ parameters ▹ 2

What is the correct way to spec a file transfer?

Comment
Add comment
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Close

4 Answers

  • Sort: 
avatar image
1
Best Answer

Answer by Jeremy Whitlock · Oct 14, 2014 at 04:57 PM

This has been resolved. I didn't realize the Swagger schema was being updated in a different repository and swagger-tools didn't reflect the latest schema. I've fixed this, pushed to Bower and NPM. [swagger-tools@0.6.1](https://www.npmjs.org/package/swagger-tools)

Comment
Add comment Show 1 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Jeremy Whitlock · Oct 14, 2014 at 04:58 PM 0
Link

swagger-tools has been fixed but that does not mean a127 is updated to use the new version. I'll let Scott comment on that.

avatar image
0

Answer by Hung Vo · Oct 13, 2014 at 11:35 PM

'consumes' is at the same level as 'parameters', it is not a child of 'parameters'. i also have tried at the global level. is 'file' a valid 'type' value? i am struggling with how to define a file transfer. do you know of a good example on how to define this?

Comment
Add comment · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Jeremy Whitlock · Oct 14, 2014 at 02:52 AM

I'm not sure if this helps but it seems `file` is handled differently: https://github.com/wordnik/swagger-spec/blob/master/versions/2.0.md

Comment
Add comment · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Hung Vo · Oct 14, 2014 at 06:04 PM

much thanks

Comment
Add comment · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

How do I see Swagger UI of an Apigee 127 project? 3 Answers

Getting started with swagger-node (Apigee 127) and swagger-ui 7 Answers

A127 Error after adding quota 2 Answers

Disable Swagger Input Validation 2 Answers

How to configure swagger in apigee-127 for pass-through soap requests 3 Answers

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2019 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Members
  • Badges