docs
docs copied to clipboard
Docs for 2.6.0
- [ ] Take changes in the distribution into account in the getting started guide, see also https://github.com/api-platform/docs/issues/1219
- [ ] Add docs for PHP 8 attributes, use attributes in addition to annotations everywhere (#1428, #1411)
- [ ] Add docs for the new global configuration
- [ ] Add docs for all new features listed in the changelog: https://github.com/api-platform/core/releases/tag/v2.6.0-alpha.1
Hi!
I don't know if I should add this comment here. You can delete it if it's not the appropriate place to do this.
I've tried API-P v2.6-alpha in order to test the JWT authentication workflow by following the documentation.
The only thing I had to look into my vendors for was the Swagger
documentation that was replaced by OpenAPI
v3.
Thus, to make it work, I had to change the following doc block to decorate the right service:
services:
# ...
App\Swagger\SwaggerDecorator:
decorates: 'api_platform.swagger.normalizer.documentation'
arguments: ['@App\Swagger\SwaggerDecorator.inner']
autoconfigure: false
by something like
services:
# ...
App\OpenApi\OpenApiDecorator:
decorates: 'api_platform.openapi.normalizer'
arguments: ['@.inner']
autoconfigure: false
I've tried the PHP 8 Attribute for ApiResource
and it's working great. The following example is the User Entity ApiResource
annotation from the SymfonyCast course converted to an Attribute as I wanted a more complex example to try it out.
#[ApiResource(
collectionOperations: ['get', 'post' => ['security' => "is_granted('IS_AUTHENTICATED_ANONYMOUSLY')"]],
itemOperations: ['get', 'put' => ['security' => "is_granted('ROLE_USER') and object == user"]],
denormalizationContext: ['groups' => ['user:write']],
normalizationContext: ['groups' => ['user:read']],
security: "is_granted('ROLE_USER')")
]
Do you need some help to document new behaviors or to report breaking parts in the doc?
Have a nice week-end!
Hi @kayneth OpenAPI docs is available (see https://github.com/api-platform/docs/pull/1145/files) Note that I'd suggest to decorate the OpenAPIFactory not the normalizer anymore.
Taking advantage of the question I would like to suggest for this new version of the documentation if possible an enrichment of the deploy in production environment. I miss this richer information in the documentation :innocent:
it should be noted references to component schema's are changed :angel:
-$ref: '#/components/schemas/Entity:jsonld-EntityGroup'
+$ref: '#/components/schemas/Entity.jsonld-EntityGroup'