Commit Graph

201 Commits

Author SHA1 Message Date
Benjamin Fleischer
0ef6ac30fc Clear out master 2017-05-02 09:57:09 -05:00
Benjamin Fleischer
ec7b5859f7 Document namespace 2017-05-01 10:25:14 -05:00
Benjamin Fleischer
96028a7b99 Document new reflection options; support :foreign_key 2017-05-01 10:18:13 -05:00
Cassidy K
aa619b5e0e Update Serializers and Rendering Docs
- Updating general/serializers.md
- Updating docs/general/rendering.md
- adding to changelog
- Updating rendering.md to indicate that `each_serializer` must be used on a collection
- updating my handle in previous changelog entry
2017-04-19 11:29:20 -04:00
Timur
1a5e66b933 [0.10] add docs for include (#2081)
* Add docs for `include` option in the adapter
2017-03-28 02:16:45 -05:00
Ryunosuke Sato
cec6478f32 Fix example code in doc/general/getting_started.md
The `belongs_to` method should take relation name, not a foreign_key property.
2017-03-24 10:40:27 +09:00
lvela
c377b7e31d Correct info on using JSON adapter
I think this needs to be changed (based on info above).
2017-03-13 14:21:56 -05:00
Matt Gardner
24c0212c83 Providing caveat in documentation (#2070)
* Providing caveat in documentation

I think it'd be helpful to mention that `jsonapi_parse!` will throw an InvalidDocument error.

* Update ember-and-json-api.md
2017-03-08 18:04:35 -05:00
Hitabis GmbH
d48aaefdb2 Remove typo from upgrade from 0.8 to 0.10 docs
Typo ActiveMode::Serializer was changed to ActiveModel::Serializer
2017-03-07 09:36:05 +01:00
Akiicat
19f8ada4af Update serializers.md 2017-02-28 05:23:19 +08:00
Nick Ottrando
a9d533d916 Update outside_controller_use.md (#2047)
* Update outside_controller_use.md

Provide example for options parameter when serializing a resource.
2017-02-08 15:06:31 -06:00
Benjamin Fleischer
58e3983e4c Merge pull request #2037 from bf4/doc_derive_attributes_from_names_and_fix_accessors
Document Model declared attributes
2017-02-02 02:29:25 -06:00
Benjamin Fleischer
1e47c167a1 Merge branch 'master' into patch-1 2017-01-31 09:07:52 -06:00
Benjamin Fleischer
28c1b5bef6 Document Model delcared attributes 2017-01-31 09:02:51 -06:00
Igor Zubkov
3c6eb57ee9 Replace object with collection.
Replace resource with collection.
2017-01-24 13:28:50 +02:00
Igor Zubkov
d6b1b1c81f Fix typo 2017-01-24 13:27:20 +02:00
MSathieu
ab98c4a664 Update logging.md 2017-01-22 13:14:19 +01:00
MSathieu
3d44bfcf28 Update logging.md 2017-01-17 18:21:21 +01:00
MSathieu
68f8ebedf4 Update logging.md 2017-01-17 17:43:22 +01:00
Benjamin Fleischer
93ca27fe44 Merge 0-10-stable into master (to fix breaking change). (#2023)
* Merge pull request #1990 from mxie/mx-result-typo

Fix typos and capitalization in Relationship Links docs [ci skip]

* Merge pull request #1992 from ojiry/bump_ruby_versions

Run tests by Ruby 2.2.6 and 2.3.3

* Merge pull request #1994 from bf4/promote_architecture

Promote important architecture description that answers a lot of questions we get
Conflicts:
	docs/ARCHITECTURE.md

* Merge pull request #1999 from bf4/typos

Fix typos [ci skip]

* Merge pull request #2000 from berfarah/patch-1

Link to 0.10.3 tag instead of `master` branch

* Merge pull request #2007 from bf4/check_ci

Test was failing due to change in JSON exception message when parsing empty string

* Swap out KeyTransform for CaseTransform (#1993)

* delete KeyTransform, use CaseTransform

* added changelog

Conflicts:
	CHANGELOG.md

* Merge pull request #2005 from kofronpi/support-ruby-2.4

Update jsonapi runtime dependency to 0.1.1.beta6

* Bump to v0.10.4

* Merge pull request #2018 from rails-api/bump_version

Bump to v0.10.4 [ci skip]
Conflicts:
	CHANGELOG.md

* Merge pull request #2019 from bf4/fix_method_redefined_warning

Fix AMS warnings

* Merge pull request #2020 from bf4/silence_grape_warnings

Silence Grape warnings

* Merge pull request #2017 from bf4/remove_warnings

Fix mt6 assert_nil warnings

* Updated isolated tests to assert correct behavior. (#2010)

* Updated isolated tests to assert correct behavior.
* Added check to get unsafe params if rails version is great than 5

* Merge pull request #2012 from bf4/cleanup_isolated_jsonapi_renderer_tests_a_bit

Cleanup assertions in isolated jsonapi renderer tests a bit

* Add Model#attributes helper; make test attributes explicit

* Fix model attributes accessors

* Fix typos

* Randomize testing of compatibility layer against regressions

* Test bugfix

* Add CHANGELOG

* Merge pull request #1981 from groyoh/link_doc

Fix relationship links doc
Conflicts:
	CHANGELOG.md
2017-01-10 02:28:50 -06:00
Yohan Robert
91128fadb8 [skip ci] Fix relationship link documentation 2016-12-30 21:02:03 +01:00
Benjamin Fleischer
15a8f2c1eb Promote important architecture description that answers a lot of questions we get 2016-12-04 15:26:44 -06:00
Melissa Xie
3733efaf99 Use consistent capitalization for JSONAPI adapter references 2016-11-29 10:41:16 -05:00
Melissa Xie
4f72cc7d8c Fix "result" typo 2016-11-29 10:38:12 -05:00
Benjamin Fleischer
772b7999c5 Better AMS Model attributes interface 2016-11-21 09:14:26 -06:00
Alex Popov
d39dd04c11 Update SerializableResource documentation (#1977)
Mention that ActiveModelSerializers::SerializableResource.new can be used for
single resource as well as for collections
2016-11-17 13:57:07 +01:00
L. Preston Sego III
d31d741f43 Make serializer lookup configurable (#1757) 2016-11-16 18:38:40 +01:00
L. Preston Sego III
b29395b0ac This adds namespace lookup to serializer_for (#1968)
* This adds namespace lookup to serializer_for

* address rubocop issue

* address @bf4's feedback

* add docs

* update docs, add more tests

* apparently rails master doesn't have before filter

* try to address serializer cache issue between tests

* update cache for serializer lookup to include namespace in the key, and fix the tests for explicit namespace

* update docs, and use better cache key creation method

* update docs [ci skip]

* update docs [ci skip]

* add to changelog [ci skip]
2016-11-09 07:57:39 -05:00
Julia
b709cd41e6 Improve type method documentation (#1967) 2016-11-04 16:49:48 +01:00
大野峻典
ce8dd36633 Add documentation for root (#1959) 2016-11-01 19:25:52 +01:00
Benjamin Fleischer
6c6e45b23f Replace fail/rescue CollectionSerializer::NoSerializerError with throw/catch :no_serializer (#1767) 2016-09-26 10:18:27 -04:00
Brendon Muir
0606b06abd Update upgrade_from_0_8_to_0_10.md (#1933)
Update upgrade_from_0_8_to_0_10.md

Changes the upgrade guide to highlight the change in the way relationships are walked.
2016-09-20 13:38:53 -04:00
Ikariusrb
58ebf96e03 Update ember-and-json-api.md (#1894)
* Update ember-and-json-api.md

Removed ember-data adapter change to support include directives, as it's now built-in.  Updated the documentation for how to add include directives to ember store queries, and added documentation covering how to tell Rails that we are consuming and generating jsonapi data

* Fix up format for parameter restrictions

* Update ember-and-json-api.md

Updates to address comments; explain why Rails should know what format we are consuming/generating, reword introduction to include: examples, and fix render statement to specify jsonapi instead of json.
2016-09-07 16:26:33 -04:00
Mario Olivio Flores
1899437566 Add info on setting polymorphic serializers (#1906)
While this same document provides details on how to override the
serializer_for, not all users will realize this could be used to set the
sterilizers for polymorphic relationships.  This change just adds a link
to that documentation and makes that point obvious.
2016-09-07 15:22:08 -04:00
Filippos Vasilakis
50f27546c3 Add docs for links (#1909)
Add docs for links

Add docs for links

Add docs for links

Add docs for links

Add docs for links

Add controller info

Grammar fixing

Improve docs

some small wording changes

Add pr to changelog
2016-09-07 15:10:45 -04:00
Alberto Miedes Garcés
050060478d Fix typo (#1916) 2016-09-06 08:42:04 -04:00
Benjamin Fleischer
d34069b6ae Merge pull request #1799 from ScottKbka/patch-1
Update rendering.md
2016-08-31 16:18:47 -05:00
Benjamin Fleischer
ab85ce2b13 Merge pull request #1888 from Patsy-issa/patch-1
Updated ember integration guide to use the proper renderer
2016-08-31 01:07:30 -05:00
Ian C. Anderson
2423ca4999 Support key transformation for Attributes adapter (#1889)
The `:attributes` adapter is the default one, but it did not support
key transformation. This was very surprising behavior, since the
"Configuration Options" page in the guides didn't mention that this
behavior was not supported by the attributes adapter.

This commit adds key transform support to the attributes adapter, and
adds documentation about the default transform for the attributes
adapter (which is `:unaltered`).

This commit also handles arrays when transforming keys, which was needed
in the case where you're serializing a collection with the Attributes
adapter. With the JSON adapter, it was always guaranteed to pass a hash
to the KeyTransform functions because of the top-level key. Since there
is no top-level key for the Attributes adapter, the return value could
be an array.
2016-08-25 15:21:27 -04:00
Patsy Issa
77a4a27757 Updated to use lazy loading when requiring 2016-08-24 10:42:01 +03:00
Patsy Issa
714c620ea2 Updated to use the proper renderer 2016-08-22 12:32:22 +03:00
Scott Kobewka
7178b9de7b Documenting Adapter. Fixing typo in association.rb documentation. 2016-08-17 20:24:36 -04:00
Benjamin Fleischer
26bcdbe44a Clean up docs 2016-08-17 16:16:13 -05:00
Benjamin Fleischer
a0dd5e58cc Merge branch 'xn-patch-1' 2016-08-17 16:13:37 -05:00
L. Preston Sego III
6de3f31b6e Namespace separator setting for json-api and tests (#1874)
Adds jsonapi_namespace_separator configuration

Also:

* Enable getting type from record class without serializer

Needs Followup:

- https://github.com/rails-api/active_model_serializers/pull/1874#discussion_r74607042 
- https://github.com/rails-api/active_model_serializers/pull/1874#discussion_r74607734
2016-08-12 12:54:42 -05:00
Benjamin Fleischer
9217bc2ec4 Merge pull request #1844 from bkoltai/bk_upgrade_0_8_to_0_10_doc
Add documentation on upgrading from `0.8` to `0.10` safely
2016-08-08 20:54:34 -05:00
Edward Andrews-Hodgson
be8f136d15 Add warning in caching documentation 2016-08-04 17:17:00 +01:00
Leo Correa
6567989ad7 Specify how to get the instance of the serializer (#1861)
[DOC] `SerializableResource#serializer` vs. `SerializableResource#serializer_instance` [ci skip]
2016-07-27 13:59:12 -05:00
bluehallu
4ff33a7ad1 Fix typo (#1855) 2016-07-24 15:49:38 -04:00
bkoltai
d9ba5cd768 Fix typos and make examples more explicit 2016-07-20 21:07:06 -07:00