Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relative paths in $ref to external files are not resolved correctly #260

Open
1 of 3 tasks
kazukinagata opened this issue Nov 25, 2024 · 1 comment
Open
1 of 3 tasks

Comments

@kazukinagata
Copy link

Description

When referencing split files with the same name located in different directories using relative paths, the issue arises at this line, where URLs are treated as duplicates. As a result, the correct type definitions are not generated.

Do you have plans to fix this issue? If not, I would be happy to submit a PR includes the necessary fixes and tests.

Thank you for this amazing library!

samples/nested-relative-refs/
├── index.yaml
├── models
│   ├── metadata.yaml
│   └── user.yaml
└── requests
    ├── metadata.yaml
    └── user.yaml
# samples/nested/relative-refs/models/user.yaml
title: User
description: User model
type: object
xml:
  name: User
properties:
  name:
    type: string
  metadata:
    $ref: './metadata.yaml'
required:
  - name
  - metadata
# samples/nested/relative-refs/requests/user.yaml
title: UserRequest
description: User request
type: object
xml:
  name: UserRequest
properties:
  name:
    type: string
  metadata:
    $ref: './metadata.yaml'

Environment

  • Package version: v0.24.0
  • OS:
    • Linux
    • Windows
    • macOS
  • Node.js version: 18.20.4
  • npm version: 10.7.0

Additional context

@kazukinagata
Copy link
Author

Should we just move on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant