Comments (3)
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.
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.
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)
- Unable to specify arbitrary query parameters HOT 3
- Unable to specify type for list elements HOT 1
- HTTPTransport ignores credentials HOT 2
- Merge environment settings for SSL requests HOT 2
- Is it possible to set a timeout? HOT 3
- Proxy settings in session instances not honored. HOT 2
- Please add license
- [version-3] No replacement for `coreschema.render_to_form` HOT 1
- [version-3] 'CoreJSONCodec' object has no attribute 'dump' HOT 1
- CamelCase CoreJSON Codec for easier integration with non-Python clients HOT 3
- Remove dependency on itypes or take over maintenance HOT 2
- Document Field.schema HOT 3
- Add entrypoint to pass SSL verification option HOT 1
- Getting continous requests.exceptions.ConnectionError
- Use of codecs and codec plugins is very confusing
- No License HOT 2
- How to show the differences between schema versions?
- OSError: Invalid cross-device link
- License mismatch betweend BSD2c and BSD3c HOT 1
- generated python code doesn't work HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-client.