Describe the bug
When referencing paths from another file with json pointer encoding according to RFC-6901 or url encoding, Models not found in the input data
is outputted.
To Reproduce
openapi.yaml:
openapi: 3.0.1
info:
title: "pass"
version: ""
paths:
# events
/test/subscribe:
$ref: "evts.yaml#/paths/~1test~1test"
evts.yaml:
openapi: 3.0.1
info:
title: evts
description: evts
version: "0.0.0"
tags:
- name: evts
description: |
evts
paths:
/test/test:
post:
operationId: evts
description: |
evts
tags:
- Events
parameters: []
requestBody:
content:
application/json:
schema:
type: object
responses:
default:
description: ""
callbacks:
test:
'{$url}':
post:
requestBody:
description: ""
required: true
content:
application/json:
schema:
"$ref": "#/components/schemas/Sample"
responses:
default:
description: ""
components:
schemas:
Sample:
description: Sample
type: object
properties:
sample:
type: string
Used commandline:
$ datamodel-codegen --input openapi.yaml --input-file-type openapi --openapi-scopes paths
Expected behavior
Generation of models.
Version:
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too