Generate full-depth JSON Schemas for FML features

Abierto
#17,833 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
json, python, yaml

Línea de trabajo

Start by reading the code that generates and stores feature schemas from experimenter.yaml and the per-channel .fml.yaml files, then trace the branch editor autocomplete, schema display, and features page diffs that consume them. The issue names no specific code files or tests, so first locate those entry points and their existing schema tests. Done means generated schemas represent nested objects, enums, maps, lists, and optional fields, with desktop remaining out of scope.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Experimenter generates a JSON Schema for each mobile/web (FML) feature from experimenter.yaml, which nimbus-fml generate-experimenter produces. That projection flattens every nested FML type (objects, maps, lists) to json, drops Option nullability, and only keeps enum variants on top-level variables. The schema we store, display, and use for editor autocomplete therefore only describes top-level variables. For a feature like messaging, where most of the structure lives in nested objects (MessageData, StyleData, etc.), the schema shows almost nothing useful.

Deep validation of mobile feature values already goes through FmlClient against the full FML, so this is about the schema we generate and expose, not about validation correctness.

Proposal: generate the JSON Schema for FML features from the full FML (the per-channel .fml.yaml files we already fetch) so it covers the whole spec: nested objects, enums, maps, lists, and optional fields. Desktop is out of scope.

This touches several places that consume the stored schema today, including the branch editor's autocomplete (which only handles flat schemas), the schema display in the branch editor, and the feature schema diffs on the features page.

Related: #17675

┆Issue is synchronized with this Jira Task

Lenguaje dominante
Python
Estrellas
152
Forks
231
Merge medio
23 h 54 min
PR fusionados (30 d)
201

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 mozilla/experimenter

Todos los issues de mozilla/experimenter

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.