Skip to content

Modify response- and request-body snippets to have language attribute depending on Content-Type header #462

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

Closed
fsmorygo opened this issue Nov 22, 2017 · 2 comments
Labels
status: superseded Superseded by another issue type: enhancement Enhancement that adds a new feature

Comments

@fsmorygo
Copy link

fsmorygo commented Nov 22, 2017

Current default snippet

[source,options="nowrap"]
----
{{body}}
----

It's much more convenient to automatically add json attribute like this:

[source,{{language}},options="nowrap"]
----
{{body}}
----

AbstractBodySnippet#createModel could set language property in model depending on the contentType

@fsmorygo fsmorygo changed the title Modify response- and request-body snippets to have json attribute if corresponding Content-Type header is application/json Modify response- and request-body snippets to have language attribute depending on Content-Type header Nov 22, 2017
@wilkinsona
Copy link
Member

Nice idea. Thanks for the suggestion.

@wilkinsona wilkinsona added the type: enhancement Enhancement that adds a new feature label Nov 22, 2017
@wilkinsona wilkinsona added this to the 2.1.0.RC1 milestone Nov 22, 2017
@wilkinsona wilkinsona removed this from the 2.1.0-RC1 milestone Mar 24, 2022
@wilkinsona
Copy link
Member

Closing in favor of #797.

@wilkinsona wilkinsona closed this as not planned Won't fix, can't repro, duplicate, stale Jul 15, 2022
@wilkinsona wilkinsona added the status: superseded Superseded by another issue label Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: superseded Superseded by another issue type: enhancement Enhancement that adds a new feature
Projects
None yet
2 participants