Coder Social home page Coder Social logo

Comments (3)

stefkohub avatar stefkohub commented on July 29, 2024

Sono d'accordo sul posizionare le info di glossario in components.schemas.

A tal proposito ti propongo una struttura come questa:

components:
  schemas:
    taxCode:
      $ref: '#/components/x-glossary/teamdigitale/TaxCode'
    Problem:
      $ref: '#/components/x-glossary/teamdigitale/Problem'

  x-glossary:
    teamdigitale:
      TaxCode:
        $ref: "https://raw.githubusercontent.com/teamdigitale/openapi/master/docs/schemas/tax_code.yaml#/TaxCode"
      Problem:
        $ref: "https://raw.githubusercontent.com/teamdigitale/openapi/0.0.1/docs/schemas/problem.yaml#/Problem"
      description: "Glossario definito dal Team Digitale"
      publisher: Team Digitale
      ecosystem: Eventuale Ecosistema
      version: Versione

In questo modo abbiamo:

  1. la possibilità di definire modelli a partire da un glossario esterno definito
  2. la possibilità di definire più di un glossario a cui fare riferimento negli schema
  3. la possibilità di descrivere in termini business, con i campi opzionali description, publisher, ecosystem e version lo specifico glossario

from api-openapi-samples.

ioggstream avatar ioggstream commented on July 29, 2024

Ciao @stefkohub

  • capito l'obiettivo
  • potremmo farlo nel file sorgente (eg. schemas/glossario-muoversi.yaml#/x-glossary/Tax-Code)
  • non cambierei l'alberatura di OAS invece. Il glossario, come la definizione gdpr lo ricaverei dai datatype, non dall'API.

from api-openapi-samples.

stefkohub avatar stefkohub commented on July 29, 2024

Concordo, la struttura x-glossary può andare in un YAML separato, e contenere sia le informazioni dei datatype che le informazioni "di business" accessorie.

from api-openapi-samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.