Model the local API Explorer fixtures without a key prefix hack
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Read docs/_docset.yml, src/Elastic.ApiExplorer/Infrastructure/IsolatedApiAliases.cs, OpenApiGenerator.ApiConfigsToRender, and AssemblerOpenApiBuildStep.DiscoverApiOwners to trace how fixture keys are declared and handled. Compare explicit fixture metadata with moving fixtures out of the product namespace, then choose a design that keeps the docset key and URL key identical. Done means assembler builds skip fixtures and isolated builds serve them under that same key.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The docs-builder- prefix on API keys in docs/_docset.yml exists only so this repo can preview API pages locally, and it should be modeled explicitly.
What is getting in your way
docs/_docset.yml declares its API fixtures as docs-builder-elasticsearch, docs-builder-kibana and so on. These are copies of product specs for isolated preview. The assembler also loads this checkout, and two docsets that declare the same API key produce a Duplicate API key error in DiscoverApiOwners. The prefix avoids that error, and several places then special-case it:
IsolatedApiAliases.IsFixtureKeyandIsolatedApiAliases.UrlKeyinsrc/Elastic.ApiExplorer/Infrastructure/IsolatedApiAliases.csrecognize and strip the prefix.OpenApiGenerator.ApiConfigsToRenderskips the keys in the assembler and shortens them in isolated builds.AssemblerOpenApiBuildStep.DiscoverApiOwnersskips them.
The declared key and the URL key differ in this one repo. An api: elasticsearch toc entry from Mount API pages in the navigation of isolated builds matches the short key, not the declared one, which is easy to get wrong.
What would you like instead
A fixture is a declared concept and not a naming convention. For example, an api: entry could carry a flag such as fixture: true, or the fixtures could move out of the product namespace. Then the assembler can skip them without reading a prefix, and isolated builds can serve them under their normal key.
Whatever shape wins, the key in docset.yml and the key in the URL should be the same string.
Anything else
The history does not state why the prefix exists. The reason above comes from reading the code that uses it. The change was introduced in Restyle API Explorer pages, sidebar, and top bar.
This is accepted as it is for now. RFC: Floating sections in the navigation tree works with the prefix as it is.
- Lingua principale
- C#
- Stelle
- 25
- Fork
- 44
- Merge medio
- 17h 21m
- PR unite (30g)
- 343
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di elastic/docs-builder
-
bug needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
elastic/docs-builder#4697 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
elastic/docs-builder#4495 ·
I maintainer di solito rispondono entro 1 giorno
-
needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
elastic/docs-builder#4232 ·
I maintainer di solito rispondono entro 1 giorno
-
chore needs triage tech-debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
elastic/docs-builder#3567 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
chore needs triage tech-debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
elastic/docs-builder#3566 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di elastic/docs-builder
Issue simili
-
Docs typoAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
MonoGame/docs.monogame.github.io#328 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
space-wizards/RobustToolbox#7197 ·
I maintainer di solito rispondono entro 1 giorno
-
[P2] Interpreter: Array.prototype.findLastIndex starts at the wrong index for long array-likesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
RicoSuter/Namotion.Interceptor#918 ·
I maintainer di solito rispondono entro 1 giorno