Comments (4)
Is there going to be an official list of methods for defining a common subset of all of the extensions (profiles) as suggestions?
Probably not. I need to re-read the profile RFC, but I think you can only have one?
should there be a place to list common profiles/meta URLs,
Ideally, profiles include the application semantics, so really, there shouldn't be a lot of commonality.
How do we avoid bloat of N metas/profiles in each response?
Anything which is used by a large number of people should become an actual addition to the spec. Think of it as 'pull up method', the refactoring technique.
Is there going to be a suggested best practice for profile URLs to contain a version number in the profile URL?
Nope. In general, media types generally aren't versioned. There's nothing stopping you from including a version somehow if you'd like; for example, you could namespace your profiles to introduce one ("profile":"http://mysite.com/v2/profile"
).
I think that covers everything. Let me know if I didn't.
from json-api.
should there be a place to list common profiles/meta URLs,
Ideally, profiles include the application semantics, so really, there shouldn't be a lot of commonality.
I don't think usually that Rails apps at least are going to be describing custom profile URLs. If someone integrates with a specific api, be it their own application's api or a specific vendor's, they won't benefit as much from some URL that describes something unless it is solely for identification and version as a sanity check that the think that they integrated with did not change.
I see much more benefit in a URL that either describes a package of functionality like a gem that alters API behavior, or it describes a specific behavior or set of behaviors (like paging using a specific URL scheme).
If it describes a package of behavior it might have a 1:1 relationship between the version of the gem and the URL, i.e. https://api.rubygems.org/restful_json/v5.0.0
, such that the restful_json gem would emit that version in its response and the client could look at it and determine whether it was compatible, and if not, it may quit or complain unless it matched/fuzzy matched it. It could even have the api description of part of gemspec and rubygems.org could host the human readable description. (And that wouldn't be Ruby specific- the same could be done for Java, etc.- they'd just need their own.) This seems cool, but I don't think it is as useful, because it isn't describing specific behaviors that the client can use, and is basically not much different than application-specific integration. It also would expose what gems a vendor is using in their API, so could even be a security hole.
If it describes a specific behavior instead, it might look like https://some.standards.org.or.vendor/api/paging
. Multiple gems that provide paging functionality through controller api extension (like restful_json and others) could use the same URL. Then the client would know it could just append &page=1
to the URL to get the first page of results. But, if this is done, we should really have some sort of standards organization that is ok'ing different schemes so that they were well-planned and could last longer. I think this should be done to greatly future-proof the spec. Most of the current spec could even be split into different behaviors. This would increase the size of the responses significantly, so perhaps it could be a separate single call to get a list of behaviors of the spec that could be cached in the client.
from json-api.
Seems related to #45
from json-api.
Oops, seems related to #21
from json-api.
Related Issues (20)
- Is there any way to include not related models into a model for JsonApiFramework 2.8.0? HOT 2
- Provide JSON Schema for JSON:API 1.1 HOT 2
- Provide an updates list/blog HOT 9
- 1.1 seems to contain a breaking change - 'lid' now required for resource creation? HOT 2
- How is 'lid' actually used? The 1.1 spec says nothing about this HOT 13
- Allow custom resource links HOT 13
- Why the square bracket syntax for query params? HOT 7
- consider support for implementation-specific members HOT 2
- JSON-LD integration example HOT 1
- Clarify intent of links member HOT 1
- How does one document a JSON:API HOT 4
- 1.1 spec disallows e.g. filter[author.name] HOT 4
- Inclusion of related resources for heterogeneous collections
- PrimaryResourceType not to be null at this point HOT 1
- Create/update relationships having attributes? HOT 3
- ember-data link on implementations page is broken HOT 2
- Bulk delete as either extention or implementation HOT 4
- Extend Spec To Allow Creation of Multiple Resources in One API Call HOT 1
- Profiles should be allowed to define query parameters HOT 5
- JSONRenderer does not extract includes from PolymorphicModelSerializer properly 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 json-api.