Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

139
Vistas
Why Swagger javascript ref does work in Schemas

I have tow schemas in my aplication, and thats like json inside another json, so i try that

    /**
     * @swagger
     * components:
     *   schemas:
     *      IlistItens:
     *        type: object
     *        required:
     *          - name
     *          - isChecked
     *          - tagColor
     *        properties:
     *          name:
     *            type: string
     *            description: name of task
     *          isChecked:
     *            type: boolean
     *            description: check to finish task
     *          tagColor:
     *            type: HexColor
     *            description: Color of task
     *        exemple:
     *          name: Finish the Job
     *          isChecked: false
     *          tagColor: #0099ff
     */

And i try to use a ref in my second interface.

    /**
     * @swagger
     * components:
     *   schemas:
     *      ICardList:
     *        type: object
     *        required:
     *          - title
     *          - listItens
     *        properties:
     *          title:
     *            type: string
     *            description: Title of List
     *          listItens:
     *            type:
     *              $ref: '#/components/schemas/IListItens'
     *        exemple:
     *          title: List Title
     *          listItens: {"name": "Task to do", "isChecked": false, "color": "#0099ff"}
     */

but every $ref: '#/components/schemas/IListItens' return message error like Could not resolve reference: #/components/schemas/IListItens and i search for a solution and read most of forum, i cant find solution. What i did wrong?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda