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

Change <!-- RESPONSE --> to // RESPONSE inside a code block comment #30

Closed
diegoulloao opened this issue Sep 5, 2020 · 8 comments · Fixed by #51
Closed

Change <!-- RESPONSE --> to // RESPONSE inside a code block comment #30

diegoulloao opened this issue Sep 5, 2020 · 8 comments · Fixed by #51

Comments

@diegoulloao
Copy link

diegoulloao commented Sep 5, 2020

There is a problem when documenting an example response.

Actually works like:

<!-- RESPONSE -->
{
... data
}
<!-- ENDRESPONSE -->

But the problem with that is looks ugly and not readable in Insomina Docs tab, without format.

I suggest change it to:

// RESPONSE
{
    ... data
}

all inside a codeblock.

In that form the markdown format preserves in the Insomnia doc tab and will still appear at the right panel as response example in the generated documentation.

@diegoulloao diegoulloao changed the title Switch <!-- RESPONSE --> example to comment inside code block Change <!-- RESPONSE --> example to comment inside code block Sep 5, 2020
@diegoulloao diegoulloao changed the title Change <!-- RESPONSE --> example to comment inside code block Change <!-- RESPONSE --> example to code block comment Sep 5, 2020
@diegoulloao diegoulloao changed the title Change <!-- RESPONSE --> example to code block comment Change <!-- RESPONSE --> to // RESPONSE inside a code block comment Sep 5, 2020
@jozsefsallai
Copy link
Collaborator

I'll take this into consideration because I do agree that the current way to do it looks quite ugly! Thank you :)

@mperezcorrales
Copy link

Hi, I was reading this issue and was wondering how you add the response to the documentation? I don't know if when exporting the data from the Insomnia client you could add the response preview. Thanks for the help.

@devhammed
Copy link
Collaborator

Hello there!

I am thinking we can leverage the language tag support of markdown code blocks for this:

Screenshot from 2021-03-29 11-09-05

And I have actually implemented it:

Screenshot from 2021-03-29 11-10-07

@diegoulloao
Copy link
Author

diegoulloao commented Apr 11, 2021

@devhammed much better!

@devhammed
Copy link
Collaborator

Hello everyone, I have just created the pull request at #51 ... hopefully, @jozsefsallai will be able to merge it ASAP.

@devhammed
Copy link
Collaborator

Hello everyone!

If you are using the plugin, you can now upgrade to use the new example response format.

Documenting:

Screenshot from 2021-05-18 17-25-32

Insomnia Rendering:

Screenshot from 2021-05-18 17-25-18

Documenter Rendering:

Screenshot from 2021-05-18 17-25-50

@jeffersonfelixdev
Copy link

I think it is a good idea to add it in docs.

@devhammed
Copy link
Collaborator

I think it is a good idea to add it in docs.

Is it not already?

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

Successfully merging a pull request may close this issue.

5 participants