{"uid":"cap_2m1qrK5i5TSBt-FzNuWTn","slug":"openapi-ref-inliner-resolver-4d2cd83f","name":"OpenAPI $ref Inliner / Resolver","description":"Inline every local `$ref` in an OpenAPI 3.x or Swagger 2.x document so downstream tools see a self-contained spec. Resolves `#/components/...` (OpenAPI) and `#/definitions/...` (Swagger) JSON-pointer refs anywhere in the document, including inside components themselves. Per-branch cycle detection: if A→B→A, the second A is left as a `$ref` and recorded under `circular`. External refs (http://, file://, ./other.yaml) are never fetched - they're reported under `external` and left as-is.","url":"https://agent402.tools/api/openapi-resolve-refs","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"spec":{"description":"OpenAPI/Swagger document (object or JSON string)"}}},"responseSchema":{"type":"json","example":{"spec":{"info":{"title":"Demo","version":"1.0.0"},"paths":{"/users/{id}":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}},"description":"ok"}},"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}]}}},"openapi":"3.0.0","components":{"schemas":{"User":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"parameters":{"UserId":{"in":"path","name":"id","schema":{"type":"string"},"required":true}}}},"circular":[],"external":[],"resolved":2,"unresolved":[]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_YHoLnJolelQ0GNSzycKPu","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Resolves and inlines all local $ref pointers in an OpenAPI 3.x or Swagger 2.x document, producing a fully self-contained spec with no unresolved references.","exampleAgentPrompt":"Take this OpenAPI 3.x spec and inline all the local $ref pointers so I get back a fully self-contained document with no unresolved references — here's the spec: { ... }","exampleUseCases":null,"resultDescription":"A fully resolved OpenAPI or Swagger document returned as a JSON object, where every local $ref (e.g. #/components/schemas/Foo or #/definitions/Bar) has been replaced with the actual inlined schema content, making the document self-contained and ready for downstream tools.","failureModes":["Circular $ref chains may cause infinite recursion or an error response","Invalid JSON string input returns a parse error","Non-OpenAPI/Swagger documents may yield unexpected or partial resolution","External $ref URLs (non-local) are not resolved and remain as-is","Malformed $ref pointers that don't match #/components/... or #/definitions/... are left unresolved"],"whenToPreferThis":"Use this endpoint when your OpenAPI 3.x or Swagger 2.x document uses local $ref pointers that confuse downstream code generators, validators, or documentation tools. Ideal when you need a flat, portable spec with no external dependencies on shared component sections.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T13:08:37.531Z","isFirstParty":false}