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

field truncation in yaml conversion (newline) #306

Open
gcornacchia opened this issue Sep 6, 2024 · 1 comment · May be fixed by #310
Open

field truncation in yaml conversion (newline) #306

gcornacchia opened this issue Sep 6, 2024 · 1 comment · May be fixed by #310
Assignees
Labels

Comments

@gcornacchia
Copy link

Describe the bug
If I try to convert a json file to yaml, if there's a string field with a lot of characters, during yaml conversion the value is splitted in a new line

To Reproduce
Steps to reproduce the behavior:

try to convert this file
petstore.json

in my vs code it happens that this $ref field is splitted in two lines

  responses:
    "200":
      description: successful operation
      schema:
        $ref: "#/definitions/ApiResponseskdfljflajfdòlasjfdoqwiureojsefoajsdoifqjoiwejr\
          alsdjflaksjefdklajsdflòajdfòasldjfsal"

Expected behavior
I don't want this splitting on two lines

Screenshots
If applicable, add screenshots to help explain your problem.

(please complete the following information):

  • OS: Windows
  • Version 11
  • Vscode version 1.93.0
  • Extension version 1.12.2

Additional context
Add any other context about the problem here.

@gcornacchia gcornacchia added the bug Something isn't working label Sep 6, 2024
@hilleer hilleer linked a pull request Sep 7, 2024 that will close this issue
1 task
@hilleer hilleer added feature and removed bug Something isn't working labels Sep 7, 2024
@hilleer hilleer linked a pull request Sep 7, 2024 that will close this issue
1 task
@hilleer
Copy link
Owner

hilleer commented Jan 4, 2025

Hi @gcornacchia

Sorry for the long wait here.

If you're still interested in this possibility, would you mind testing out this pre-package attached below (of this pull-request)?

With the updated version you can set a new configuration yamlLineWidth that you can set to 0 to disable line wrapping. See the updated docs here.

yaml-plus-json-1.13.0.vsix.zip

(Remember to unzip the file)

If you have not tried to install a vsix file manually before, you can find how-to help here.

Let me know if you hav any feedback on the approach of controlling the line width via this new config 🙌

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

Successfully merging a pull request may close this issue.

2 participants