Skip to content

Commit

Permalink
Update links, fix spelling errors & language
Browse files Browse the repository at this point in the history
  • Loading branch information
sandoba authored and soyuka committed Oct 16, 2023
1 parent 367d800 commit aa441c6
Show file tree
Hide file tree
Showing 37 changed files with 92 additions and 92 deletions.
2 changes: 1 addition & 1 deletion admin/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
![Screencast](images/admin-demo.gif)

API Platform Admin is a tool to automatically create a beautiful (Material Design) and fully-featured administration interface
for any API supporting [the Hydra Core Vocabulary](http://www.hydra-cg.com/), exposing an [OpenAPI documentation](https://www.openapis.org/)
for any API supporting [the Hydra Core Vocabulary](https://www.hydra-cg.com/), exposing an [OpenAPI documentation](https://www.openapis.org/)
or other API specification formats supported by [`@api-platform/api-doc-parser`](https://github.com/api-platform/api-doc-parser).

API Platform Admin is the perfect companion of APIs created
Expand Down
2 changes: 1 addition & 1 deletion core/angularjs-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Warning: for a new project, you should consider using [the API Platform's Progre

## Restangular

API Platform works fine with [AngularJS v1](http://angularjs.org). The popular [Restangular](https://github.com/mgonto/restangular)
API Platform works fine with [AngularJS v1](https://angularjs.org/). The popular [Restangular](https://github.com/mgonto/restangular)
REST client library for Angular can easily be configured to handle the API format.

Here is a working Restangular config:
Expand Down
8 changes: 4 additions & 4 deletions core/content-negotiation.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ Format | Format name |
----------------------------------------------------------------|--------------|-------------------------------|----------------------------------------
[JSON-LD](https://json-ld.org) | `jsonld` | `application/ld+json` | yes
[GraphQL](graphql.md) | n/a | n/a | yes
[JSON:API](http://jsonapi.org/) | `jsonapi` | `application/vnd.api+json` | yes
[JSON:API](https://jsonapi.org/) | `jsonapi` | `application/vnd.api+json` | yes
[HAL](https://stateless.group/hal_specification.html) | `jsonhal` | `application/hal+json` | yes
[YAML](http://yaml.org/) | `yaml` | `application/x-yaml` | no
[YAML](https://yaml.org/) | `yaml` | `application/x-yaml` | no
[CSV](https://tools.ietf.org/html/rfc4180) | `csv` | `text/csv` | no
[HTML](https://whatwg.org/) (API docs) | `html` | `text/html` | no
[XML](https://www.w3.org/XML/) | `xml` | `application/xml`, `text/xml` | no
Expand Down Expand Up @@ -119,7 +119,7 @@ Additionally the `csv` format is added with the MIME type `text/csv`.
It is also important to notice that the usage of this attribute will override the formats defined in the configuration, therefore
this configuration might disable the `json` or the `html` on this resource for example.

You can specify different accepted formats at operation level too, it's especially convenient for to configure formats available for the `PATCH` method:
You can specify different accepted formats at operation level too, it's especially convenient to configure formats available for the `PATCH` method:

[codeSelector]

Expand Down Expand Up @@ -183,7 +183,7 @@ resources:
## Supporting Custom Formats

The API Platform content negotiation system is extendable.
You can add support for formats not available by default by creating custom normalizer and encoders.
You can add support for formats not available by default by creating custom normalizers and encoders.
Refer to the Symfony documentation to learn [how to create and register such classes](https://symfony.com/doc/current/serializer.html#adding-normalizers-and-encoders).

Then, register the new format in the configuration:
Expand Down
6 changes: 3 additions & 3 deletions core/controllers.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Note: using custom controllers with API Platform is **discouraged**. Also, Graph
[For most use cases, better extension points, working both with REST and GraphQL, are available](design.md).

API Platform can leverage the Symfony routing system to register custom operations related to custom controllers. Such custom
controllers can be any valid [Symfony controller](http://symfony.com/doc/current/book/controller.html), including standard
controllers can be any valid [Symfony controller](https://symfony.com/doc/current/controller.html), including standard
Symfony controllers extending the [`Symfony\Bundle\FrameworkBundle\Controller\AbstractController`](http://api.symfony.com/4.1/Symfony/Bundle/FrameworkBundle/Controller/AbstractController.html)
helper class.

Expand All @@ -15,7 +15,7 @@ implements the [Action-Domain-Responder](https://github.com/pmjones/adr) pattern
The distribution of API Platform also eases the implementation of the ADR pattern: it automatically registers action classes
stored in `api/src/Controller` as autowired services.

Thanks to the [autowiring](http://symfony.com/doc/current/components/dependency_injection/autowiring.html) feature of the
Thanks to the [autowiring](https://symfony.com/doc/current/service_container/autowiring.html) feature of the
Symfony Dependency Injection container, services required by an action can be type-hinted in its constructor, it will be
automatically instantiated and injected, without having to declare it explicitly.

Expand Down Expand Up @@ -433,7 +433,7 @@ resources:
[/codeSelector]

API Platform will automatically map this `post_publication` operation to the route `book_post_publication`. Let's create a custom action
and its related route using annotations:
and its related route using attributes:

```php
<?php
Expand Down
2 changes: 1 addition & 1 deletion core/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ It's a tedious task that should be avoided as much as possible.
On the other hand, the evolution strategy (also known as versionless APIs) consists of deprecating the fields, resources
types or operations that will be removed at some point.

Most modern API formats including [JSON-LD / Hydra](content-negotiation.md), [GraphQL](graphql.md) and [OpenAPI](swagger.md)
Most modern API formats including [JSON-LD / Hydra](content-negotiation.md), [GraphQL](graphql.md) and [OpenAPI](openapi.md)
allow you to mark resources types, operations or fields as deprecated.

## Deprecating Resource Classes, Operations and Properties
Expand Down
2 changes: 1 addition & 1 deletion core/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ To do so, you have to write a plain old PHP object (POPO) representing the input
that is [marked with the `#[ApiResource]` attribute](../distribution/index.md).
This class **doesn't have** to be mapped with Doctrine ORM, or any other persistence system. It must be simple (it's usually
just a data structure with no or minimal behaviors) and will be automatically converted to [Hydra](extending-jsonld-context.md),
[OpenAPI](swagger.md) and [GraphQL](graphql.md) documentations or schemas by API Platform (there is a 1-1 mapping
[OpenAPI](openapi.md) and [GraphQL](graphql.md) documentations or schemas by API Platform (there is a 1-1 mapping
between this class and those docs).

Then, it's up to the developer to feed API Platform with an hydrated instance of this API resource object by implementing
Expand Down
2 changes: 1 addition & 1 deletion core/extending.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Extending API Platform

Because it handles the complex, tedious and repetitive task of creating an API infrastructure for you, API Platform lets you focus on what matter the most for the end user: the business logic.
Because it handles the complex, tedious and repetitive task of creating an API infrastructure for you, API Platform lets you focus on what matters the most for the end user: the business logic.
To do so, API Platform provides a lot of extension points you can use to hook your own code.
Those extensions points are taken into account both by the REST and [GraphQL](graphql.md) subsystems.

Expand Down
10 changes: 5 additions & 5 deletions core/external-vocabularies.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Using External Vocabularies

JSON-LD allows to define classes and properties of your API with open vocabularies such as [Schema.org](https://schema.org)
and [Good Relations](http://www.heppnetz.de/projects/goodrelations/).
and [Good Relations](https://www.heppnetz.de/projects/goodrelations/).

API Platform provides annotations usable on PHP classes and properties for specifying a related external [IRI](https://en.wikipedia.org/wiki/Internationalized_resource_identifier).
API Platform provides attributes usable on PHP classes and properties for specifying a related external [IRI](https://en.wikipedia.org/wiki/Internationalized_resource_identifier).

```php
<?php
Expand All @@ -25,7 +25,7 @@ class Book
}
```

The generated JSON for products and the related context document will now use external IRIs according to the specified annotations:
The generated JSON for products and the related context document will now use external IRIs according to the specified attributes:

`GET /books/22`

Expand All @@ -50,9 +50,9 @@ The generated JSON for products and the related context document will now use ex
}
```

An extended list of existing open vocabularies is available on [the Linked Open Vocabularies (LOV) database](http://lov.okfn.org/dataset/lov/).
An extended list of existing open vocabularies is available on [the Linked Open Vocabularies (LOV) database](https://lov.linkeddata.es/dataset/lov/).

By default, when using [validations](validation.md) API Platform will try to define known [Schema.org](https://schema.org) types as IRIs for your properties if you did not provide any in your `#[ApiProperty]` annotations.
By default, when using [validations](validation.md) API Platform will try to define known [Schema.org](https://schema.org) types as IRIs for your properties if you did not provide any in your `#[ApiProperty]` attributes.
Built-in mapping is:

Constraints | Schema.org type |
Expand Down
6 changes: 3 additions & 3 deletions core/filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ by the library.

By default, all filters are disabled. They must be enabled explicitly.

When a filter is enabled, it automatically appears in the [OpenAPI](swagger.md) and [GraphQL](graphql.md) documentations.
When a filter is enabled, it automatically appears in the [OpenAPI](openapi.md) and [GraphQL](graphql.md) documentations.
It is also automatically documented as a `hydra:search` property for JSON-LD responses.

<p align="center" class="symfonycasts"><a href="https://symfonycasts.com/screencast/api-platform/filters?cid=apip"><img src="../distribution/images/symfonycasts-player.png" alt="Filtering and Searching screencast"><br>Watch the Filtering & Searching screencast</a>
Expand Down Expand Up @@ -1416,10 +1416,10 @@ class AndOperatorFilterExtension implements RequestBodySearchCollectionExtension

### Using Doctrine ORM Filters

Doctrine ORM features [a filter system](http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/filters.html) that allows the developer to add SQL to the conditional clauses of queries, regardless of the place where the SQL is generated (e.g. from a DQL query, or by loading associated entities).
Doctrine ORM features [a filter system](https://www.doctrine-project.org/projects/doctrine-orm/en/latest/reference/filters.html) that allows the developer to add SQL to the conditional clauses of queries, regardless of the place where the SQL is generated (e.g. from a DQL query, or by loading associated entities).
These are applied to collections and items and therefore are incredibly useful.

The following information, specific to Doctrine filters in Symfony, is based upon [a great article posted on Michaël Perrin's blog](http://blog.michaelperrin.fr/2014/12/05/doctrine-filters/).
The following information, specific to Doctrine filters in Symfony, is based upon [a great article posted on Michaël Perrin's blog](https://www.michaelperrin.fr/blog/2014/12/doctrine-filters).

Suppose we have a `User` entity and an `Order` entity related to the `User` one. A user should only see his orders and no one else's.

Expand Down
22 changes: 11 additions & 11 deletions core/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ If you plan to migrate from FOSRestBundle, you might want to read [this guide](m
If you are starting a new project, the easiest way to get API Platform up is to install the [API Platform Distribution](../distribution/index.md).
It comes with the API Platform core library integrated with [the Symfony framework](https://symfony.com), [the schema generator](../schema-generator/),
[Doctrine ORM](https://www.doctrine-project.org), [Elasticsearch-PHP](https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/index.html),
[NelmioCorsBundle](https://github.com/nelmio/NelmioCorsBundle) and [Behat](http://behat.org).
[NelmioCorsBundle](https://github.com/nelmio/NelmioCorsBundle) and [Behat](https://behat.org/).
[Doctrine MongoDB ODM](https://www.doctrine-project.org/projects/mongodb-odm.html) can also be enabled by following the [MongoDB documentation](mongodb.md).
Basically, it is a Symfony edition packaged with the best tools to develop a REST API and sensible default settings.

Alternatively, you can use [Composer](http://getcomposer.org) to install the standalone bundle in an existing Symfony Flex
Alternatively, you can use [Composer](https://getcomposer.org/) to install the standalone bundle in an existing Symfony Flex
project:

`composer require api`
Expand All @@ -26,17 +26,17 @@ There are no mandatory configuration options although [many settings are availab

If you haven't read it already, take a look at [the Getting Started guide](../distribution/index.md).
This tutorial covers basic concepts required to understand how API Platform works including how it implements the REST pattern
and what [JSON-LD](http://json-ld.org/) and [Hydra](http://www.hydra-cg.com/) formats are.
and what [JSON-LD](https://json-ld.org/) and [Hydra](https://www.hydra-cg.com/) formats are.

## Mapping the Entities

<p align="center" class="symfonycasts"><a href="https://symfonycasts.com/screencast/api-platform/api-resource?cid=apip"><img src="../distribution/images/symfonycasts-player.png" alt="Create an API Resource screencast"><br>Watch the Create an API Resource screencast</a></p>

API Platform is able to automatically expose entities mapped as "API resources" through a REST API supporting CRUD
operations.
To expose your entities, you can use Docblock annotations, XML and YAML configuration files.
To expose your entities, you can use attributes, XML and YAML configuration files.

Here is an example of entities mapped using annotations which will be exposed through a REST API:
Here is an example of entities mapped using attributes which will be exposed through a REST API:

```php
<?php
Expand Down Expand Up @@ -139,8 +139,8 @@ class Offer
It is the minimal configuration required to expose `Product` and `Offer` entities as JSON-LD documents through an hypermedia
web API.

If you are familiar with the Symfony ecosystem, you noticed that entity classes are also mapped with Doctrine ORM annotations
and validation constraints from [the Symfony Validator Component](http://symfony.com/doc/current/book/validation.html).
If you are familiar with the Symfony ecosystem, you noticed that entity classes are also mapped with Doctrine ORM attributes
and validation constraints from [the Symfony Validator Component](https://symfony.com/doc/current/validation.html).
This isn't mandatory. You can use [your preferred persistence](state-providers.md) and [validation](validation.md) systems.
However, API Platform has built-in support for those libraries and is able to use them without requiring any specific
code or configuration to automatically persist and validate your data. They are a good default option and we encourage you to use
Expand All @@ -164,7 +164,7 @@ The same operations are available for the offer method (routes will start with t
Route prefixes are built by pluralizing the name of the mapped entity class.
It is also possible to override the naming convention using [operation path namings](operation-path-naming.md).

As an alternative to annotations, you can map entity classes using YAML or XML:
As an alternative to attributes, you can map entity classes using YAML or XML:

[codeSelector]

Expand Down Expand Up @@ -202,14 +202,14 @@ resources:

[/codeSelector]

If you prefer to use YAML or XML files instead of annotations, you must configure API Platform to load the appropriate files:
If you prefer to use YAML or XML files instead of attributes, you must configure API Platform to load the appropriate files:

```yaml
# api/config/packages/api_platform.yaml
api_platform:
mapping:
paths:
- '%kernel.project_dir%/src/Entity' # default configuration for annotations
- '%kernel.project_dir%/src/Entity' # default configuration for attributes
- '%kernel.project_dir%/config/api_platform' # yaml or xml directory configuration
```
Expand All @@ -220,6 +220,6 @@ If you want to serialize only a subset of your data, please refer to the [Serial
You now have a fully featured API exposing your entities.
Run the Symfony app with the [Symfony Local Web Server](https://symfony.com/doc/current/setup/symfony_server.html) (`symfony server:start`) and browse the API entrypoint at `http://localhost:8000/api`.

Interact with the API using a REST client (we recommend [Postman](https://www.getpostman.com/)) or an Hydra-aware application
Interact with the API using a REST client (we recommend [Postman](https://www.postman.com/)) or an Hydra-aware application
(you should give [Hydra Console](https://github.com/lanthaler/HydraConsole) a try). Take
a look at the usage examples in [the `features` directory](https://github.com/api-platform/core/tree/main/features).
6 changes: 3 additions & 3 deletions core/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ API Platform Core is an easy-to-use and powerful library to create [hypermedia-d
It is a component of the [API Platform framework](https://api-platform.com). It can be used as a standalone or with [the Symfony
framework](https://symfony.com) (recommended).

It embraces [JSON for Linked Data (JSON-LD)](http://json-ld.org) and [Hydra Core Vocabulary](http://www.hydra-cg.com) web
standards but also supports [HAL](http://stateless.co/hal_specification.html), [Swagger/Open API](https://www.openapis.org/), XML, JSON, CSV and YAML.
It embraces [JSON for Linked Data (JSON-LD)](https://json-ld.org/) and [Hydra Core Vocabulary](https://www.hydra-cg.com/) web
standards but also supports [HAL](https://stateless.co/hal_specification.html), [Swagger/Open API](https://www.openapis.org/), XML, JSON, CSV and YAML.

Build a working and fully featured CRUD API in minutes. Leverage the awesome features of the tool to develop complex and
high-performance API-first projects.
Expand All @@ -21,7 +21,7 @@ Here is the fully featured REST API you'll get in minutes:

* [Automatic CRUD](operations.md)
* Hypermedia (JSON-LD and HAL)
* Machine-readable documentation of the API in the Hydra and [Swagger/Open API](swagger.md) formats,
* Machine-readable documentation of the API in the Hydra and [Swagger/Open API](openapi.md) formats,
guessed from PHPDoc, Serializer, Validator and Doctrine ORM / MongoDB ODM metadata
* Nice human-readable documentation built with Swagger UI (including a sandbox) and/or ReDoc
* [Pagination](pagination.md)
Expand Down
4 changes: 2 additions & 2 deletions core/json-schema.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# JSON Schema Support

[JSON Schema](https://json-schema.org/) is a popular vocabulary to describe the shape of JSON documents. A variant of JSON Schema is also used [in OpenAPI specifications](swagger.md).
[JSON Schema](https://json-schema.org/) is a popular vocabulary to describe the shape of JSON documents. A variant of JSON Schema is also used [in OpenAPI specifications](openapi.md).

API Platform provides an infrastructure to generate JSON Schemas for any resource, represented in any format (including JSON-LD).
The generated schema can be used with libraries such as [react-json-schema-form](https://github.com/rjsf-team/react-jsonschema-form) to build forms for the documented resources, or to [be used for validation](https://json-schema.org/implementations.html#validators).
Expand Down Expand Up @@ -75,7 +75,7 @@ class Greeting
}
```

You can obtain more information about the available [JSON Schema Types and format here](http://json-schema.org/understanding-json-schema/reference/type.html).
You can obtain more information about the available [JSON Schema Types and format here](https://json-schema.org/understanding-json-schema/reference/type.html).

## Generating a JSON Schema Programmatically

Expand Down
Loading

0 comments on commit aa441c6

Please sign in to comment.