JSONAPI::Resources - 提供了一个框架来开发一个符合JSON API规范的服务器

网友投稿 522 2022-11-05

jsONAPI::Resources - 提供了一个框架来开发一个符合JSON API规范的服务器

JSONAPI::Resources -  提供了一个框架来开发一个符合JSON API规范的服务器

JSONAPI::Resources, or "JR", provides a framework for developing an API server that complies with the JSON:API specification.

Like JSON:API itself, JR's design is focused on the resources served by an API. JR needs little more than a definition of your resources, including their attributes and relationships, to make your server compliant with JSON API.

JR is designed to work with Rails 4.2+, and provides custom routes, controllers, and serializers. JR's resources may be backed by ActiveRecord models or by custom objects.

Documentation

Full documentation can be found at http://jsonapi-resources.com, including the v0.10 alpha Guide specific to this version.

Demo App

We have a simple demo app, called Peeps, available to show how JR is used.

Client Libraries

JSON:API maintains a (non-verified) listing of client libraries which should be compatible with JSON:API compliant server implementations such as JR.

Installation

Add JR to your application's Gemfile:

gem 'jsonapi-resources'

And then execute:

bundle

Or install it yourself as:

gem install jsonapi-resources

For further usage see the v0.10 alpha Guide

Contributing

Submit an issue describing any new features you wish it add or the bug you intend to fixFork it ( http://github.com/cerebris/jsonapi-resources/fork )Create your feature branch (git checkout -b my-new-feature)Run the full test suite (rake test)Fix any failing testsCommit your changes (git commit -am 'Add some feature')Push to the branch (git push origin my-new-feature)Create a new Pull Request

Did you find a bug?

Ensure the bug was not already reported by searching on GitHub under Issues. If you're unable to find an open issue addressing the problem, open a new one. Be sure to include a title and clear description, as much relevant information as possible, and a code sample or an executable test case demonstrating the expected behavior that is not occurring. If possible, use the relevant bug report templates to create the issue. Simply copy the content of the appropriate template into a .rb file, make the necessary changes to demonstrate the issue, and paste the content into the issue description or attach as a file:Rails 5 issues

License

Copyright 2014-2017 Cerebris Corporation. MIT License (see LICENSE for details).

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:116. 填充每个节点的下一个右侧节点指针
下一篇:bean的生命周期核心步骤总结
相关文章

 发表评论

暂时没有评论,来抢沙发吧~