Git Product home page Git Product logo

Comments (6)

christianhelle avatar christianhelle commented on August 22, 2024

@richardhu-lmg thanks for taking the time to report this. Multi-part upload support is currently not implemented yet but I will add it to my to-do list

from refitter.

richardhu-lmg avatar richardhu-lmg commented on August 22, 2024

@richardhu-lmg thanks for taking the time to report this. Multi-part upload support is currently not implemented yet but I will add it to my to-do list

Any estimate re when the fix will be implemented?

from refitter.

christianhelle avatar christianhelle commented on August 22, 2024

@richardhu-lmg thanks for taking the time to report this. Multi-part upload support is currently not implemented yet but I will add it to my to-do list

Any estimate re when the fix will be implemented?

@richardhu-lmg Sorry, I can't really honestly say when I'll implement this. I'll try looking into how complex this is tonight, and if it's simple enough, it will probably be done in a few minutes or hours. Otherwise, it will be completed when I find the time.

@richardhu-lmg You are more than welcome to give it a shot yourself and create a pull request, I'm very open and lenient regarding pull requests

from refitter.

christianhelle avatar christianhelle commented on August 22, 2024

@all-contributors please add @richardhu-lmg for bugs

from refitter.

allcontributors avatar allcontributors commented on August 22, 2024

@christianhelle

I've put up a pull request to add @richardhu-lmg! 🎉

from refitter.

christianhelle avatar christianhelle commented on August 22, 2024

I have an implementation where the following OpenAPI v3 specifications

{
   "openapi":"3.0.2",
   "paths":{
      "/foo/{id}/files":{
         "post":{
            "summary":"uploads a file",
            "operationId":"uploadFile",
            "parameters":[
               {
                  "name":"id",
                  "in":"path",
                  "description":"Id of the foo resource",
                  "required":true,
                  "schema":{
                     "type":"integer",
                     "format":"int64"
                  }
               }
            ],
            "requestBody":{
               "content":{
                  "multipart/form-data":{
                     "schema":{
                        "type":"object",
                        "properties":{
                           "formFile":{
                              "type":"string",
                              "format":"binary"
                           }
                        }
                     },
                     "encoding":{
                        "formFile":{
                           "style":"form"
                        }
                     }
                  }
               }
            },
            "responses":{
               "200":{
                  "description":"successful operation"
               }
            }
         }
      }
   }
}

Generates the following Refit interface

public interface IApiClient
{
    [Multipart]
    [Post("/foo/{id}/files")]
    Task UploadFile(long id, StreamPart formFile);
}

@richardhu-lmg Will this work for you?

from refitter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.