Skip to content

Conversation

@stefkohub
Copy link

…in components.schemas a livello di classe ed attributo

In questo modo si coprono sia gli aspetti di trasparenza sui gestori e responsabili del trattamento dei dati, che lato schema per la composizione automatica dell'insieme delle informazioni per gestire il genere di dato trattato.

Copy link
Contributor

@ioggstream ioggstream left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stefkohub che dici di usare {role: , name: , email: , } ?

run: 'MILANO, Greco Pirelli, Stazione'
transport: '3'
TimetableFermata:
x-gdpr:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stefkohub mi pare sensato.

type: string
x:
$ref: '#/components/schemas/Longitudine'
x-gdpr:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stefkohub

  • $ref è un puntatore tout-court, non puoi affiancargli nulla.
  • il tipo di dato dovrebb'essere eventualmente definito nello schema "puntato" (eg. Latitudine)

Copy link
Author

@stefkohub stefkohub Dec 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Messo così effettivamente viene ignorato dal motore ufficiale, per renderlo corretto potremmo ragionare anche sul senso che avrebbe usare un allOf:

allOf:
  - $ref: '#/components/schemas/Longitudine'
  - x-gdpr: ...

Però credo sia più importante quello che dici nel secondo punto. E' molto meglio definire questo attributo gdpr nello schema "puntato" da $ref.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

afaik gli elementi della lista allOf devono essere schema, mentre x-gdpr è un oggetto. Ti torna? Ci ho pensato ancora e non ho trovato soluzioni alternative al definire x-gdpr al di fuori dello schema puntato da $ref...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Si anche io ci ho ragionato un po' e sono d'accordo.
Va messo nello schema "puntato" da $ref.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants