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

Text editor opens an empty file #131

Closed
zcalcopietrojr opened this issue Aug 1, 2019 · 3 comments
Closed

Text editor opens an empty file #131

zcalcopietrojr opened this issue Aug 1, 2019 · 3 comments
Labels
bug Something isn't working no repro we can't reproduce this (yet)

Comments

@zcalcopietrojr
Copy link

Hello guys,

I gave it a try and I really enjoyed it, but I have a little problem with 'POST' (and other verbs that send a body).

My default text editor opens an empty file when it should open with a template based on my swagger.json, right?

I set my default editor with the command - pref set editor.command.default "{{text editor path}}" - and my swager exposes the template for operation as follow:
image

I dont know if this is a issue or a miss configuration.

Thank you.

@tlmii
Copy link
Member

tlmii commented Aug 10, 2019

Yes, the tool should give you a template based on your swagger.json file.

Which swagger/openapi version are you using?

Could you supply your whole swagger.json file? Or at least the sections relevant to that particular api call?

One thing to try is to use another api to see if it works there. For instance, try the following commands:

pref set editor.command.default "{{text editor path}}"
set base https://petstore.swagger.io/v2/
cd user
post

In my case, that opens up my editor with the following template:

{
  "id": 0,
  "username": "",
  "firstName": "",
  "lastName": "",
  "email": "",
  "password": "",
  "phone": "",
  "userStatus": 0
}

Does that work for you? If not, we probably need to look at your swagger.sjon file and see if there is a reason we aren't detecting your endpoint as expected.

@tlmii tlmii added bug Something isn't working no repro we can't reproduce this (yet) labels Aug 10, 2019
@tlmii
Copy link
Member

tlmii commented Aug 13, 2019

@jrCalcopietro Just checking in to see if you had any more info here. Doing a bit of a bug bash so would like to take a look if you can provide any more details.

@tlmii
Copy link
Member

tlmii commented Aug 14, 2019

Going to close this as no repro right now. If you're able to provide a repro for your situation, post back and we can take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working no repro we can't reproduce this (yet)
Projects
None yet
Development

No branches or pull requests

2 participants