astahmer / openapi-zod-client

Generate a zodios (typescript http client with zod validation) from an OpenAPI spec (json/yaml)

Home Page:openapi-zod-client.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

uri ref is broken, if property name is "MyGeneric<Temp>" then ref is "MyGeneric%3CTemp%3E" and it's not resolved.

NikitaFedorov1 opened this issue · comments

#/components/schemas/api/properties/MyGeneric%3Calias-_index.d.ts-541-729-_index.d.ts-0-1797420362607%3E not found
    // actual: 
    // map["MyGeneric%3CTemp%3E"]
    // expected:
    // map["MyGeneric<Temp>"]
    return map[name]; 

current:

var autocorrectRef = function autocorrectRef(ref) {
  return decodeURI(ref[1] === "/" ? ref : "#/" + ref.slice(1));
};

should be like:

var autocorrectRef = function autocorrectRef(ref) {
  return decodeURI(ref[1] === "/" ? ref : "#/" + ref.slice(1));
};

And nested refs ain't resolved:

Error: Schema #/components/schemas/consolidation/properties/Command not found