What is the correct way to describe GET for downloading files of different MIME type


I want to design to a GET and POST entry point for downloading different kinds of files (.doc, .png, .zip, etc)

What is the right way to describe the spec for both GET and POST? can anyone point me to an example maybe?


@tavopb24 - just to double check, your goal is to document an endpoint that has a get and a post attached to it where you are able to upload and download files. am i right?


@christian_vogel Correct! i am having trouble defining this endpoint using RAML


Maybe the jukebox example can help you then: https://github.com/mulesoft/raml-tutorial-200/blob/master/jukebox-api.raml

Let me know if that helps.


For headers/body when GET file I used next structure:

        description: File with requested ID.`
              displayName: Content-type
              description: File's MIME type ("video/mp4", etc.)
              type: string
              required: true
            type: file
            type: file