Giter Club home page Giter Club logo

Comments (3)

tomchristie avatar tomchristie commented on August 18, 2024

The CoreJSON spec documents this here: http://www.coreapi.org/specification/encoding/#document

If the CoreJSON encoding includes a url then that is used as the URL of the document. If it does not then the URL from which it was requested may be used.

The way to handle this is to ensure that the server sets the URL of the document appropriately. Eg don't set it at all development (allow whatever host/port it's being run on), and only set it to the canonical API url in staging/production environments.

from python-client.

mnoky avatar mnoky commented on August 18, 2024

Thanks Tom. Yes, I read that spec and regarding the document url it states "[the url property] MAY be considered a default value by client libraries". It wasn't clear to me if the intention of the python client was to allow the schema-provided url to be overridden or not using base_url (apparently not). So, in my case it is easy enough to just omit the url from the schema. Then, clients can choose whichever server is appropriate (e.g. test, staging, production, etc).

BTW, really loving this whole framework! Very clean and lightweight. On the client side, I love how I can use requests transport adapters to customize connections (setting CA bundle, setting up timeouts, etc). Previously used swagger generated clients where that was not possible without modifying the generated code, not very maintainable :)

from python-client.

tomchristie avatar tomchristie commented on August 18, 2024

BTW, really loving this whole framework! Very clean and lightweight. On the client side, I love how I can use requests transport adapters to customize connections (setting CA bundle, setting up timeouts, etc). Previously used swagger generated clients where that was not possible without modifying the generated code, not very maintainable :)

Great! I've been really excited by it, so it's really good to hear positive feedback about it.

from python-client.

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.