OAI / OAI/OpenAPI-Specification

Consider additional guidance on Server Objects

Aperta
#4,542 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

deployment
Lingua principale
Markdown
Stelle
31.2k
Fork
9.2k
Merge medio
6h 37m
PR unite (30g)
27

Descrizione

@karenetheridge and @notEthan raised various points about confusion and usage of the Server Object and its url field in PR #4389.

From @karenetheridge

We can also offer caution that if server urls are not absolute, then the retrieval URI will be used to resolve them, which might not be desirable because if the scheme+host of the retrieval URI may not actually be the same scheme+host as where the APIs are being hosted, the result will be that any matching of API HTTP requests against path-items in the OpenAPI document will fail.

This caveat is not new with these changes, but a user might think that an absolute $self is sufficient to ward off this problem, which it isn't.

From @notEthan (the part about server variables vs relative server URLs being the most relevant to this issue, see #4541 for other concerns raised in this quote):

I certainly agree/understand that the URIs of the API description and objects within are quite different than (or unrelated to) API server/endpoint URLs. My hesitation is on the idea that the retrieval URI for the OAD is likely to be more closely related to the server URL than $self (I've generally seen the OAD served from one place accompanying documentation, not with each deployment, and aren't server variables the better mechanism for deployment-specific URLs?).

Or rather, my hesitation as an implementer of tooling is on whether that difference is worth implementing - I have one base URI for objects in the OAD (including servers), which will be changing to inherit from $self, and no place to put another base URI. It's not difficult to implement but it adds some complexity in a place I have doubts on the real utility of it.

Note that some of this guidance could go on the Learn Site, which already has a substantial page on the Server Object.

Guida per i contributori

Apri la guida per i contributori

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.

Direzione di ricerca

Inizia dalla pagina Server Object del Learn Site e rivedi le problematiche sollevate nella PR #4389, in particolare le note relative agli URL di server relativi, agli URI di recupero e alle variabili del server. Il lavoro è completo quando si è deciso dove collocare queste indicazioni e si sono documentate chiaramente le relative avvertenze, nel Learn Site oppure nella documentazione della specifica.

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

Valutazione

Stack tecnologico
openapi
Ambito
documentation
Tipo di issue
Documentazione
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.