Have guidance for when to use unschematized models, and what patterns we have available for unschematized models

Aperta
#534 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
30/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Ambito
documentation

Direzione di ricerca

Inizia organizzando i quattro pattern unschematized-model descritti nell’issue, quindi affronta il caso separato in cui provider di terze parti possono introdurre breaking changes. Il lavoro è completato quando ogni pattern è documentato, quando è documentato in quali casi gli unschematized models sono consentiti e quando è definito un approccio al versioning per questo caso.

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

Descrizione

Graph Guidelines

This came up in a conversation with an API producer recently. I am familiar with several approaches for unschematized models, but I'm not aware of them being written down. These are what I mentioned to the API producer:

  1. If your plan is that everything be self-service in the future, your API is pretty close to correct, but we would change the open types to use Edm.Untyped instead.
  2. If your plan is that security providers are self-service in the future, but we may have first party support for some (even first party support for some of the bigger third party security providers), then we would probably want to schematize the ones with first party support. We wouldn't have to do this upfront, we could have a derived type for externalSecurityProvider that uses Edm.Untyped and is unschematized, and then we could have derived types for all of the first party supported ones (and these derived types can be backfilled at a future time).
  3. If your plan was for there to always be a manual process, then we would want to go ahead and start schematizing the known security providers.
  4. If your plan was for there to always be a manual process, but we know that the schemas are so disparate that they can't be accommodated (for example, some will use JSON, some will use XML, some will use binary blobs, and/or some we just don't know format will be used) then we actually need a slightly different approach that probably uses media entities to handle the different formats that we may receive the payloads in.

It would be good to flesh out each of these patterns as individual documents, and also have a general statement somewhere about when unschematized models are allowable.

I also want to note that none of the above patterns would work for this API producer because they have no control over the third party providers, who may introduce breaking changes at any time, so we should also have a pattern to demonstrate what versioning may look like in these cases.

Lingua principale
Nessun dato sulla lingua
Stelle
23.3k
Fork
2.7k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

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.

Altre issue di microsoft/api-guidelines

Tutte le issue di microsoft/api-guidelines

Issue simili

Altre issue su Documentation

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.