[Json-Schema] Nested resources lost externalDoc and description data
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 68/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- php
- Área
- api, backend-api-design
Línea de trabajo
Start by reading the change in src/Hydra/JsonSchema/SchemaFactory.ph introduced by #8652, which the report identifies as the source of the regression. Reproduce the example with nested SchemaThing resources and compare the generated JSON OpenAPI output before and after the change. Done means the nested resource retains its documentation and externalDocs data.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
API Platform version(s) affected: 5.0.4
Description
We have some shared api schemas that are linked to schema.org specs, and the generated jsonopenapi spec file contained this information. But after updating to the latest version, we lost these details.
Both the documentation and externalDocs fields are now empty.
screenshots
Before:After:
How to reproduce
#[Get(provider: EntityStateProvider::class, processor: EntityStateProcessor::class)]
class Entity
{
public function __construct(
#[ApiProperty(identifier: true)]
public int $id,
#[ApiProperty(readableLink: true)]
public SchemaThing $thing
)
{
}
}
#[ApiResource(description: "A schema type", types: ['https://schema.org/Thing'], operations: [])]
class SchemaThing
{
#[ApiProperty(description: "The name of the item.", iris: ['https://schema.org/name'])]
public string $name;
#[ApiProperty(description: "An alias for the item.", iris: ['https://schema.org/alternateName'])]
public string $alternateName;
}
Additional Context
If I revert the change in src/Hydra/JsonSchema/SchemaFactory.ph by #8652 the issue is fixed
- Lenguaje dominante
- PHP
- Estrellas
- 2.6k
- Forks
- 989
- Merge medio
- 1 d 23 h
- PR fusionados (30 d)
- 102
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de api-platform/core
-
JSON:API: resource schemas (`*.jsonapi`) have `properties` but no `type: object`Posiblemente ocupada @ousamabenyounes la tomó hace 2 días. Abierto
Dificultad 2/5 Menos de una hora Aptitud para principiantes 80/100
api-platform/core#8701 ·
Los mantenedores suelen responder en 1 día
-
JSON:API: `JsonApiCollectionBaseSchemaNoPagination` declares `data` as `type: array` without `items`Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
api-platform/core#8699 ·
Los mantenedores suelen responder en 1 día
-
api:openapi:export --spec-version=3.0.0 outputs `webhooks`, which is invalid in OpenAPI 3.0Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
api-platform/core#8690 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
api-platform/core#8680 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
api-platform/core#8725 ·
Los mantenedores suelen responder en 1 día
Todos los issues de api-platform/core
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
nextcloud/integration_openai#446 ·
-
bug customer-reported
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
MagnaCapax/PMSS#1101 ·
Los mantenedores suelen responder en 5 días
-
InvoiceSettled is answered 200 when the invoice cannot be re-fetched, so BTCPay never redelivers itAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
btcpayserver/woocommerce-greenfield-plugin#93 ·
Los mantenedores suelen responder en 1 día
-
kind/bug status/triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
🐛 [Bug] Bulk CSV import stores hide_from_combined_view=FALSE as a string, which hides every account from Sent, Junk, Trash and DraftsPosiblemente ocupada @exSnake la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día