Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[Json-Schema] Nested resources lost externalDoc and description data

Abierto
#8,721 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@abp002 ya está trabajando en esto.

Desde el 16/10/2026.

  • #8723 de @abp002 — abierto

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

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: Image

After:
Image

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

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de api-platform/core

Todos los issues de api-platform/core

Issues similares

Más issues de PHP

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.