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

[SPE-4405] Normalize source input location path between Windows and Unix #1048

Open
nielthiart opened this issue Oct 30, 2024 · 1 comment
Open
Labels
CLI Created by Linear-GitHub Sync linear Medium priority Created by Linear-GitHub Sync platform Created by Linear-GitHub Sync
Milestone

Comments

@nielthiart
Copy link
Contributor

nielthiart commented Oct 30, 2024

When a new SDK is created in a Windows environment, the sources[*].inputs[*].location in .speakeasy/workflow.yaml uses backslash in relative paths to address the input file.

If the same SDK is later regenerated on macOS/Linux using speaskeasy run, the input location can't be resolved.

Steps

  1. Use Windows
  2. Create a new SDK using speakeasy quickstart, referencing a local OpenAPI document as source.
  3. Transfer parent folder of SDK with OpenAPI document and SDK to Linux/macOS.
  4. On Linux/macOS, in the SDK directory, run speakeasy run

Expected result

SDK regenerates from the OpenAPI document in the parent folder.

Actual result

speakeasy run
failed to validate target test-django: failed to validate source TestDjango-OAS: failed to get output location: input file ..\openapi.yaml does not exist

Workaround

Updating the path in .speakeasy/workflow.yaml to use slashes instead of backslashes resolves this for macOS/Linux users.

SPE-4405

@simplesagar
Copy link
Member

Thanks for the report Niel !

@simplesagar simplesagar changed the title Normalize source input location path between Windows and Unix [SPE-4405] Normalize source input location path between Windows and Unix Oct 30, 2024
@simplesagar simplesagar added CLI Created by Linear-GitHub Sync platform Created by Linear-GitHub Sync Medium priority Created by Linear-GitHub Sync labels Oct 30, 2024
@simplesagar simplesagar modified the milestones: v.124, v.125 Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI Created by Linear-GitHub Sync linear Medium priority Created by Linear-GitHub Sync platform Created by Linear-GitHub Sync
Projects
None yet
Development

No branches or pull requests

2 participants