2017-02-16 24 views

回答

1

爲腎錯構瘤1可以使用file type,如:

... 
types: 
    userPicture: 
    type: file 
    fileTypes: ['image/jpeg'] 
    maxLength: 307200 

... 
/images/{imageId}: 
    get: 
    responses: 
     200: 
     body: 
      image/jpeg: 
      type: userPicture 

For RAML 0.8 the file type is only aplicable to formParameters.

但你仍然可以使用的媒體類型,例如:

/images/{imageId}: 
    get: 
    responses: 
     200: 
     body: 
      image/jpeg: 
      description: an image... 
+0

我想這代碼,但它是爲RAML 1.0,我使用0.8版本。我做的工作方式並沒有提到userPicture類型 –

+0

完美,正是我所做的:) –

相關問題