Giter VIP home page Giter VIP logo

Comments (6)

Alex009 avatar Alex009 commented on June 8, 2024 2

in our usecases we not read response headers yet and do status code checks only in ErrorFeature (if status code not successful then this feature try create exception for this case).
i think it will be good if we add HttpResponse<Model> case in generation, in addition to already exists methods

from moko-network.

shadowsheep1 avatar shadowsheep1 commented on June 8, 2024

@ATchernov the problem is that you still support only 1.3.50 version of kotlin. You need to update the kotlin-multiplatform generator to address the new kotlin versions and maintain that in a faster way [-;

from moko-network.

Alex009 avatar Alex009 commented on June 8, 2024

@shadowsheep1 moko-network use 1.3.70, what do you mean about 1.3.50?

from moko-network.

shadowsheep1 avatar shadowsheep1 commented on June 8, 2024

Hey @ATchernov didn't see you're a moko-network contrib, thinking you were from openapi plugin, sorry. Moko is great 'casue it follows tight kotlin version releases, while the openapi client gen is stuck on 1.3.50.
https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/kotlin.md
OpenAPITools/openapi-generator#5346

At a first look, you differ from the kotlin-multiplatform version

--library multiplatform

java -jar openapi-generator-cli-4.2.2.jar generate -g kotlin -p packageName=it.shadowsheep.mpp.app.client --library multiplatform --additional-properties nonPublicApi=true -i openapi.yaml -o open_mpp

of openapi-client client gen because you return the Model and not the HttpResponse<Model> of the model.

This way how do you propagate http response status code and headers? This info should be useful.

/cc @Alex009

from moko-network.

Alex009 avatar Alex009 commented on June 8, 2024

required usecase - reading of headers in response

from moko-network.

shadowsheep1 avatar shadowsheep1 commented on June 8, 2024

Another use case is that we have response status code with a deeper meaning (read custom meaning) so that we act in some way when we have a particular status code.

from moko-network.

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.