Skip to content

Commit 5a84c9d

Browse files
committed
update doc for website
1 parent 09def56 commit 5a84c9d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+36
-179
lines changed

admin/authentication-support.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Authentication can easily be handled when using the API Platform's admin library.
44
In the following section, we will assume [the API is secured using JWT](https://api-platform.com/docs/core/jwt), but the
5-
process is similar for other authentication mechanisms. The `login_uri` is the full URI to the route specified by the `firewalls.login.json_login.check_path` config in the [JWT documentation](https://api-platform.com/docs/core/jwt).
5+
process is similar for other authentication mechanisms. The `login_uri` is the full URI to the route specified by the `firewalls.login.json_login.check_path` config in the [JWT documentation](https://api-platform.com/docs/core/jwt).
66

77
The first step is to create a client to handle the authentication process:
88

@@ -11,7 +11,7 @@ The first step is to create a client to handle the authentication process:
1111
import { AUTH_LOGIN, AUTH_LOGOUT, AUTH_ERROR, AUTH_CHECK } from 'admin-on-rest';
1212

1313
// Change this to be your own login check route.
14-
const login_uri = 'https://demo.api-platform.com/login_check';
14+
const login_uri = 'https://demo.api-platform.com/login_check';
1515

1616
export default (type, params) => {
1717
switch (type) {
@@ -47,7 +47,7 @@ export default (type, params) => {
4747

4848
case AUTH_CHECK:
4949
return localStorage.getItem('token') ? Promise.resolve() : Promise.reject();
50-
50+
5151
default:
5252
return Promise.resolve();
5353
}
@@ -82,7 +82,3 @@ export default class extends Component {
8282

8383
Refer to [the chapter dedicated to authentication in the Admin On Rest documentation](https://marmelab.com/admin-on-rest/Authentication.html)
8484
for more information.
85-
86-
Previous chapter: [Getting Started](getting-started.md)
87-
88-
Next chapter: [Handling Relations to Collections](handling-relations-to-collections.md)

admin/getting-started.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Then, create a new React application for your admin:
1212
$ create-react-app my-admin
1313

1414
React and React DOM will be directly provided as dependencies of Admin On REST. As having different versions of React
15-
causes issues, remove `react` and `react-dom` from the `dependencies` section of the generated `package.json` file:
15+
causes issues, remove `react` and `react-dom` from the `dependencies` section of the generated `package.json` file:
1616

1717
```patch
1818
- "react": "^15.6.1",
@@ -157,7 +157,7 @@ export default (props) => (
157157
__Note__: In this example, we choose to send the file via a multi-part form data, but you are totally free to use another solution (like `base64`). But keep in mind that multi-part form data is the most efficient solution.
158158

159159
### Using a Custom Validation Function or Inject Custom Props
160-
160+
161161
You can use `fieldProps` and `inputProps` to respectively inject custom properties to fields and inputs generated by API
162162
Platform Admin. This is particularly useful to add custom validation rules:
163163

@@ -190,7 +190,3 @@ export default class extends Component {
190190
}
191191
}
192192
```
193-
194-
Previous chapter: [Introduction](index.md)
195-
196-
Next chapter: [Authentication Support](authentication-support.md)

admin/handling-relations-to-collections.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,3 @@ Then edit the configuration of API Platform Admin to pass a `filterToQuery` prop
169169
```
170170

171171
The autocomplete field should now work properly!
172-
173-
Previous chapter: [Authentication Support](authentication-support.md)
174-
175-
Next chapter: [Client Generator: Introduction](../client-generator/index.md)

admin/index.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,3 @@ You can also customize all screens by using Admin On Rest components and even ra
2525
* Send proper HTTP requests to the API and decode them using Hydra and JSON-LD formats
2626
* Nicely display server-side errors (e.g. advanced validation)
2727
* **100% customizable**
28-
29-
Previous chapter: [Schema Generator: configuration](../schema-generator/configuration.md)
30-
31-
Next chapter: [Getting Started](getting-started.md)

client-generator/index.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,3 @@ The generator works especially well with APIs built with the [API Platform](http
2121
* The generated HTML is compatible with [Bootstrap](https://getbootstrap.com/) and includes mandatory classes
2222
* The generated HTML code is accessible to people with disabilities ([ARIA](https://www.w3.org/WAI/intro/aria) support)
2323
* The Redux and the React Router configuration is also generated
24-
25-
Previous chapter: [Admin: Handling Relations to Collections](../admin/handling-relations-to-collections.md)
26-
27-
Next chapter: [React generator](react.md)

client-generator/react.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Bootstrap 3 - last release 0.1.15
1919
```html
2020
<!-- ... -->
2121
<title>React App</title>
22-
22+
2323
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
2424
</head>
2525
<!-- ... -->
@@ -29,7 +29,7 @@ Bootstrap 4 - from release 0.1.16
2929
```html
3030
<!-- ... -->
3131
<title>React App</title>
32-
32+
3333
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
3434
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
3535
</head>
@@ -81,7 +81,3 @@ ReactDom.render(
8181

8282
registerServiceWorker();
8383
```
84-
85-
Previous chapter: [Introduction](index.md)
86-
87-
Next chapter: [Vue.js generator](vuejs.md)

client-generator/troubleshooting.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,3 @@ details:
3838
Check access to the specified url, in this case `https://demo.api-platform.com/contexts/Entrypoint`, use curl to check
3939
access and the response `curl https://demo.api-platform.com/contexts/Entrypoint`. In the above case an "Access Denied"
4040
message in JSON format was being returned.
41-
42-
Previous chapter: [Vue.js generator](vuejs.md)
43-
44-
Next chapter: [Deployment: Introduction](../deployment/index.md)

client-generator/vuejs.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Create a Vue.js application using [vue-cli](https://github.com/vuejs/vue-cli):
77

88
Install Vue Router, Vuex and babel-plugin-transform-builtin-extend (to allow extending bultin types like Error and Array):
99

10-
$ yarn add vue-router vuex babel-plugin-transform-builtin-extend babel-preset-es2015 babel-preset-stage-2
10+
$ yarn add vue-router vuex babel-plugin-transform-builtin-extend babel-preset-es2015 babel-preset-stage-2
1111

1212
Install the generator globally:
1313

@@ -100,6 +100,3 @@ Replace the `App.vue` file with the following :
100100
</div>
101101
</template>
102102
```
103-
Previous chapter: [React generator](react.md)
104-
105-
Next chapter: [Troubleshooting](troubleshooting.md)

core/angularjs-integration.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,3 @@ nga.configure(admin);
9898
```
9999

100100
You can look at what we have done as another exemple [api-platform/admin](https://github.com/api-platform/admin).
101-
102-
Previous chapter: [NelmioApiDocBundle integration](nelmio-api-doc.md)
103-
104-
Next chapter: [Schema Generator: Introduction](../schema-generator/index.md)

core/configuration.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,3 @@ api_platform:
172172

173173
# ...
174174
```
175-
176-
Previous chapter: [Getting Started](getting-started.md)
177-
178-
Next chapter: [Operations](operations.md)

core/content-negotiation.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,7 @@ class CustomItemNormalizer implements NormalizerInterface, DenormalizerInterface
161161
162162
return $result;
163163
}
164-
164+
165165
// ...
166166
}
167167
```
168-
169-
Previous chapter: [The Serialization Process](core/serialization.md)
170-
171-
Next chapter: [Validation](core/validation.md)

core/data-providers.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,3 @@ services:
115115
'AppBundle\DataProvider\BlogPostItemDataProvider':
116116
tags: [ 'api_platform.item_data_provider' ]
117117
```
118-
119-
Previous chapter: [The Event System](core/events.md)
120-
121-
Next chapter: [Extensions](core/extensions.md)

core/default-order.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,3 @@ class Book
8080
public $author;
8181
}
8282
```
83-
84-
Previous chapter: [Operations](operations.md)
85-
86-
Next chapter: [Filters](filters.md)

core/events.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,3 @@ Constant | Event | Priority |
104104
`POST_WRITE` | `kernel.view` | 31 |
105105
`PRE_RESPOND` | `kernel.view` | 9 |
106106
`POST_RESPOND` | `kernel.response` | 0 |
107-
108-
Previous chapter: [Pagination](pagination.md)
109-
110-
Next chapter: [Data Providers](core/data-providers.md)

core/extending-jsonld-context.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Extending JSON-LD context
22

3-
API Platform Core provides the possibility to extend the JSON-LD context of properties. This allows you to describe JSON-LD
3+
API Platform Core provides the possibility to extend the JSON-LD context of properties. This allows you to describe JSON-LD
44
typed values, inverse properties using the `@reverse` keyword and you can even overwrite the `@id` property this way. Everything you define
55
within the following annotation, will be passed to the context, that provides a generic way to extend the context.
66

@@ -23,7 +23,7 @@ class Book
2323
/**
2424
* ...
2525
* @ApiProperty(
26-
* iri="http://schema.org/name",
26+
* iri="http://schema.org/name",
2727
* attributes={
2828
* "jsonld_context"={
2929
* "@id"="http://yourcustomid.com",
@@ -62,7 +62,3 @@ The generated context will now have your custom attributes set:
6262
```
6363

6464
Note that you do not have to provide the `@id` attribute, if you do not provide an `@id` attribute, the value from `iri` will be taken.
65-
66-
Previous chapter: [Using External Vocabularies](external-vocabularies.md)
67-
68-
Next chapter: [FOSUserBundle Integration](core/fosuser-bundle.md)

core/extensions.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,3 @@ security:
151151
- { path: ^/offers, roles: IS_AUTHENTICATED_FULLY }
152152
- { path: ^/users, roles: IS_AUTHENTICATED_FULLY }
153153
```
154-
155-
Previous chapter: [Extensions](core/extensions.md)
156-
157-
Next chapter: [Security](core/security.md)

core/external-vocabularies.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,3 @@ The generated JSON for products and the related context document will now use ex
5555
```
5656

5757
An extended list of existing open vocabularies is available on [the Linked Open Vocabularies (LOV) database](http://lov.okfn.org/dataset/lov/).
58-
59-
Previous chapter: [Content Negotiation](content-negotiation.md)
60-
61-
Next chapter: [Extending JSON-LD context](extending-jsonld-context.md)

core/filters.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,3 @@ services:
692692
'AppBundle\Filter\CustomOrderFilter':
693693
tags: [ 'api_platform.filter' ]
694694
```
695-
696-
Previous chapter: [Operations](operations.md)
697-
698-
Next chapter: [The Serialization Process](serialization.md)

core/form-data.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,3 @@ class AppBundle extends Bundle
111111
}
112112

113113
```
114-
115-
Previous chapter: [Operation Path Naming](operation-path-naming.md)
116-
117-
Next chapter: [Using External Vocabularies](core/external-vocabularies.md)

core/fosuser-bundle.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,3 @@ class User extends BaseUser
111111
}
112112
}
113113
```
114-
115-
Previous chapter: [Extending the JSON-LD context](core/extending-jsonld-context.md)
116-
117-
Next chapter: [NelmioApiDocBundle integration](core/nelmio-api-doc.md)

core/getting-started.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class Product // The class name will be used to name exposed resources
8686
* @Assert\NotBlank
8787
*/
8888
public $name;
89-
89+
9090
// Notice the "cascade" option below, this is mandatory if you want Doctrine to automatically persist the related entity
9191
/**
9292
* @ORM\OneToMany(targetEntity="Offer", mappedBy="product", cascade={"persist"})
@@ -95,7 +95,7 @@ class Product // The class name will be used to name exposed resources
9595

9696
public function __construct()
9797
{
98-
$this->offers = new ArrayCollection(); // Initialize $offers as an Doctrine collection
98+
$this->offers = new ArrayCollection(); // Initialize $offers as an Doctrine collection
9999
}
100100

101101
// Adding both an adder and a remover as well as updating the reverse relation are mandatory
@@ -229,7 +229,3 @@ Run the Symfony app (`bin/console server:run`) and browse the API entrypoint at
229229
Interact with the API using a REST client (we recommend [Postman](https://www.getpostman.com/)) or an Hydra aware application
230230
(you should give [Hydra Console](https://github.com/lanthaler/HydraConsole) a try). Take
231231
a look at the usage examples in [the `features` directory](https://github.com/api-platform/api-platform/tree/master/features).
232-
233-
Previous chapter: [Introduction](index.md)
234-
235-
Next chapter: [Configuration](configuration.md)

core/index.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,3 @@ contains a working app covering all features of the library.
4949
* (french) [Tour d'horizon des changements dans API Platform v2](https://les-tilleuls.coop/fr/blog/article/la-premiere-alpha-d-api-platform-2-0-est-disponible)
5050
* (french) [A la découverte de API Platform (Symfony Live Paris 2015)](https://dunglas.fr/2015/04/mes-slides-du-symfony-live-2015-a-la-decouverte-de-api-platform/)
5151
* (french) [API-first et Linked Data avec Symfony (sfPot Lille 2015)](https://les-tilleuls.coop/slides/dunglas/slides-sfPot-2015-01-15/#/)
52-
53-
Previous chapter: [API Platform Distribution: Testing and Specifying the API](../distribution/testing.md)
54-
55-
Next chapter: [Getting Started](getting-started.md)

core/jwt.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ security:
2929
providers:
3030
fos_userbundle:
3131
id: fos_user.user_provider.username
32-
32+
3333
firewalls:
3434
login:
3535
pattern: ^/login
@@ -157,7 +157,3 @@ default:
157157
```
158158

159159
Finally, mark your scenarios with the `@login` annotation to automatically add a valid `Authorization` header and with `@logout` to be sure to detroy the token after this scerario.
160-
161-
Previous chapter: [FOSUserBundle Integration](fosuser-bundle.md)
162-
163-
Next chapter: [NelmioApiDocBundle integration](nelmio-api-doc.md)

core/nelmio-api-doc.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,3 @@ nelmio_api_doc:
3333
3434
Please note that NelmioApiDocBundle has a sandbox limitation where you cannot pass a JSON array as parameter, so you cannot
3535
use it to deserialize nested objects.
36-
37-
Previous chapter: [FOSUserBundle Integration](core/fosuser-bundle.md)
38-
39-
Next chapter: [AngularJS Integration](angularjs-integration.md)

core/operation-path-naming.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,3 @@ services:
7777
api_platform:
7878
default_operation_path_resolver: 'AppBundle\PathResolver\NoSeparatorsOperationPathResolver'
7979
```
80-
81-
Previous chapter: [Performance](performance.md)
82-
83-
Next chapter: [Accept application/x-www-form-urlencoded Form Data](form-data.md)

core/operations.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -516,8 +516,3 @@ book_special:
516516
_api_resource_class: 'AppBundle\Entity\Book'
517517
_api_item_operation_name: 'special'
518518
```
519-
520-
Previous chapter: [Configuration](configuration.md)
521-
522-
Next chapter: [Overriding Default Order](default-order.md)
523-

core/pagination.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,3 @@ class Book
195195
// ...
196196
}
197197
```
198-
199-
Previous chapter: [Validation](validation.md)
200-
201-
Next chapter: [The Event System](events.md)

core/performance.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,3 @@ api_platform:
206206
```
207207

208208
The whole configuration seen before will no longer work and Doctrine will recover its default behavior.
209-
210-
Previous chapter: [Swagger Support](core/swagger.md)
211-
212-
Next chapter: [Operation Path Naming](operation-path-naming.md)

core/security.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ class Book
4343
* @ORM\GeneratedValue(strategy="AUTO")
4444
*/
4545
public $id;
46-
46+
4747
/**
4848
* @var string The title
4949
*
5050
* @ORM\Column
5151
* @Assert\NotBlank
5252
*/
5353
public $title;
54-
54+
5555
/**
5656
* @ORM\Column
5757
*/
@@ -65,7 +65,3 @@ that a user could not create a book.
6565

6666
It is also possible to use the [event system](events.md) for more advanced logic or even [custom actions](operations.md#creating-custom-operations-and-controllers)
6767
if you really need to.
68-
69-
Previous chapter: [JWT Authentification](core/jwt.md)
70-
71-
Next chapter: [Swagger Support](core/swagger.md)

core/serialization.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,3 @@ class Book
530530
// ...
531531
}
532532
```
533-
534-
Previous chapter: [Filters](filters.md)
535-
536-
Next chapter: [Content Negotiation](content-negotiation.md)

0 commit comments

Comments
 (0)