Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Move code, response, request samples to `examples` and `x-codeSample` elements

Aperta
#543 0 commenti 0 reazioni 2 assegnatari Vedi su GitHub

@sunbryely-influxdata ci sta già lavorando.

Dal 20/9/2022.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

documentation

@sranka Can you elaborate on this: is it causing a problem or not rendered or...?

Even though swagger/openapi allows to use Markdown in descriptions, the existing code generators (from swagger to a specific programming language) do not implement any translation logic to convert markdown text to what is expected in a given language. The tripple-backtick code markdown block that was used herein as an example

  • is understood by python pdoc3 API documentation generator (was wrong, repaired in this PR)
  • requires extra pre-processing in javascript client, because the javascript build tools wrongly indent the code blocks that are then not recognized by typescript api-documenter
  • is not understood in java (<pre>{@code ...}</pre> is used)
  • is not understood in c# (<code></code> is used)
  • is not understood in ruby (=begin =end is used)
  • ... other apidoc generators might not render description elements at all

The tripple backticks probably have no meaning when they are not understood ... they appear in the generated code, but the code block can lose indentantion and it could be merged to appear as a continuous text in a paragraph.

Thanks for the detailed explanation. @sunbryely-influxdata and I will move code samples from description elements to elements defined for examples (example, examples, and x-codeSample) and reserve future samples to those elements.

Originally posted by @jstirnaman in https://github.com/influxdata/openapi/issues/541#issuecomment-1252922994

Lingua principale
Shell
Stelle
18
Fork
9
Merge medio
2g 18h
PR unite (30g)
1

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di influxdata/openapi

Tutte le issue di influxdata/openapi

Issue simili

Altre issue su Shell/Bash

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.