Wording changes
Removed the language of oppression and violence and replaced it with more neutral language. Note that problematic words in the code have to remain in the docs until the code changes. Fixes #379.
This commit is contained in:
committed by
Oliver Drotbohm
parent
3838214d54
commit
ace69c5e8d
@@ -38,6 +38,6 @@ You can add links to the default representation of an entity by calling `model.a
|
||||
[[customizing-sdr.customizing-json-output.customizing-representation]]
|
||||
== Customizing the Representation
|
||||
|
||||
The Spring Data REST exporter executes any discovered `RepresentationModelProcessor` instances before it creates the output representation. It does so by registering a `Converter<Entity, EntityModel>` instance with an internal `ConversionService`. This is the component responsible for creating the links to referenced entities (such as those objects under the `_links` property in the object's JSON representation). It takes an `@Entity` and iterates over its properties, creating links for those properties that are managed by a `Repository` and copying across any embedded or simple properties.
|
||||
The Spring Data REST exporter runs any discovered `RepresentationModelProcessor` instances before it creates the output representation. It does so by registering a `Converter<Entity, EntityModel>` instance with an internal `ConversionService`. This is the component responsible for creating the links to referenced entities (such as those objects under the `_links` property in the object's JSON representation). It takes an `@Entity` and iterates over its properties, creating links for those properties that are managed by a `Repository` and copying across any embedded or simple properties.
|
||||
|
||||
If your project needs to have output in a different format, however, you can completely replace the default outgoing JSON representation with your own. If you register your own `ConversionService` in the `ApplicationContext` and register your own `Converter<Entity, EntityModel>`, you can return a `EntityModel` implementation of your choosing.
|
||||
|
||||
@@ -43,7 +43,7 @@ curl -v -H 'If-None-Match: <value of previous etag>' ...
|
||||
----
|
||||
====
|
||||
|
||||
The preceding command (by default) executes a `GET`. Spring Data REST checks for `If-None-Match` headers while doing a `GET`. If the header matches the ETag, it concludes that nothing has changed and, instead of sending a copy of the resource, sends back an HTTP `304 Not Modified` status code. Semantically, it reads "`If this supplied header value does not match the server-side version, send the whole resource. Otherwise, do not send anything.`"
|
||||
The preceding command (by default) runs a `GET`. Spring Data REST checks for `If-None-Match` headers while doing a `GET`. If the header matches the ETag, it concludes that nothing has changed and, instead of sending a copy of the resource, sends back an HTTP `304 Not Modified` status code. Semantically, it reads "`If this supplied header value does not match the server-side version, send the whole resource. Otherwise, do not send anything.`"
|
||||
|
||||
NOTE: This POJO is from an `ETag`-based unit test, so it does not have `@Entity` (JPA) or `@Document` (MongoDB) annotations, as expected in application code. It focuses solely on how a field with `@Version` results in an `ETag` header.
|
||||
|
||||
|
||||
@@ -341,7 +341,7 @@ As shown in the <<metadata.alps,previous section>>, you can reach this data by n
|
||||
|
||||
These links are the same as shown earlier. To retrieve JSON Schema, you can invoke them with the following `Accept` header: `application/schema+json`.
|
||||
|
||||
In this case, if you executed `curl -H 'Accept:application/schema+json' http://localhost:8080/profile/persons`, you would see output resembling the following:
|
||||
In this case, if you ran `curl -H 'Accept:application/schema+json' http://localhost:8080/profile/persons`, you would see output resembling the following:
|
||||
|
||||
====
|
||||
[source,javascript]
|
||||
|
||||
@@ -404,7 +404,7 @@ As the search resource is a read-only resource, it supports `GET` only.
|
||||
[[repository-resources.query-resource.supported-method.get]]
|
||||
==== `GET`
|
||||
|
||||
The `GET` method returns the result of the query execution.
|
||||
The `GET` method returns the result of the query.
|
||||
|
||||
===== Parameters
|
||||
|
||||
|
||||
@@ -24,4 +24,4 @@ https://github.com/spring-projects/spring-data-examples/tree/master/rest/securit
|
||||
[[spring-data-examples.starbucks]]
|
||||
== Starbucks example
|
||||
|
||||
https://github.com/spring-projects/spring-data-examples/tree/master/rest/starbucks[This example] exposes 10,843 Starbucks coffee shops through a RESTful API that allows access to the stores in a hypermedia-based way and exposes a resource to execute a geo-location search for coffee shops.
|
||||
https://github.com/spring-projects/spring-data-examples/tree/master/rest/starbucks[This example] exposes 10,843 Starbucks coffee shops through a RESTful API that allows access to the stores in a hypermedia-based way and exposes a resource to run a geo-location search for coffee shops.
|
||||
|
||||
Reference in New Issue
Block a user