Code Monkey home page Code Monkey logo

Comments (2)

char0n avatar char0n commented on May 20, 2024

Hi @jorgemk85,

Your definition contains cycles and even though https://editor-next.swagger.io/ (SwaggerEditor@5) is based on ApiDOM which can handle cycles easily, we still seeing that error.

The issue is that for resolving the definitions, we currently use dereference algorithm (reference removal). Dereferencing can create cycles (circular references) and cycles cannot be serialized into JSON or YAML. In order to resolve this issue properly we need to use bundling algorithm. We've already started some initial work on bundling in swagger-api/apidom#692.

What we can do for now to mitigate the issue (before we have bundling) is to run the dereferencing in replace mode and use circularReplacer to make the circular reference absolute and skip resolving it.

from swagger-ui.

jorgemk85 avatar jorgemk85 commented on May 20, 2024

Hello @char0n,

Thank you for your reply.

I am using this "https://generator3.swagger.io/index.html#/clients/generate" endpoint to procedurally transform my spec files into "html2" static websites. Could you please indicate how to specify the dereferencing property in the request body? I have tried the following without making any difference:

{
   "lang":"html2",
   "spec":"...",
   "specURL":null,
   "type":"CLIENT",
   "codegenVersion":"V3",
   "options":{
      "dereference":{
         "circular":"replace"
      }
   }
}

from swagger-ui.

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.