CLI-3551: asyncapi export generates an invalid file with $ref paths that are incorrect

Aperta
#3,056 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
go
Ambito
api, cli

Direzione di ricerca

Inizia con il comando di esportazione di Confluent asyncapi export e riproduci il problema usando uno schema con la gerarchia di oggetti Foo e Bar annidata descritta nel report. Ispeziona i percorsi $ref generati e verifica il risultato in AsyncApi Preview o AsyncApi Studio; il lavoro è completato quando il file esportato è valido e le definizioni annidate vengono risolte sotto il payload del messaggio.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

I've been evaluating the async api export from schema registry to see I can line up Confluent, AsyncApi and EventCatalogue to help my client document their estate. However, the file that confluent asyncapi export command generates isn't valid.

Steps that I used to produce an error

  1. Push event that has an object hierarchy (see below) to a new topic with scheme generation on, such a new schema is registered.
  2. Perform all of the pre steps from the Confluent docs about choosing the right environment / cluster / schema reg in the Cli.
  3. Run the Cli async api export command to generate a file
  4. Install the AsyncApi-Preview tool for VSCode
  5. After the file has generated, open the file in VS code use the VS command palette to run AsyncApi Preview
  6. Note the errors generated

"line {line number}: '#/definitions/{typenamehere}' does not exist"

The path should be '#/components/messages/{messagenamehere}/payload/definitions/{typenamehere}'

NOTE: The same error occurs if you take the file generated and view on the AsyncApi page in the Studio tool.

Example C# object

`public class Foo
{
public Bar Bar {get; set;}
}

public class Bar
{
....
}`

Lingua principale
Go
Stelle
82
Fork
37
Merge medio
1g 13h
PR unite (30g)
22

Preparare l'ambiente

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 confluentinc/cli

Tutte le issue di confluentinc/cli

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.