Commit Graph

32 Commits

Author SHA1 Message Date
Vladimír Gorej
7260005bd8 feat: consolidate syntax highlighting code into standalone plugin (#9783) 2024-04-05 21:12:25 +02:00
Michał Korczak
f803fa3410 fix(response-body): show download button both for non-empty Blob and string responses (#9343)
Co-authored-by: Vladimír Gorej <vladimir.gorej@gmail.com>

Refs #9298
2023-11-09 14:48:16 +01:00
Krzysztof Kowalczyk
cdfc4de43e fix(response-body): remove download button when content is empty (#8579)
Co-authored-by: Vladimír Gorej <vladimir.gorej@gmail.com>
2023-04-26 13:42:49 +02:00
Tim Lai
80cffc2544 fix: audio src cache change (#8102)
* #8057 Fix audio src change issue caused by reconciliation algorithm and that is why audio file load is not starting.


Co-authored-by: Roman Melnyk <r.melnyk@smartrockstars.com>
2022-07-19 11:10:28 -07:00
Helen Kosova
cc700f034b fix(try-it-out): fix the width of image responses (#7495)
Refs #5578
2021-09-15 13:25:51 +03:00
Tim Lai
92f1507408 fix(syntaxHighlighter): request and response examples for json cases (#7199)
* OAS 2 request and response examples for json cases
* OAS 3 request and response examples for json cases
* OAS2 and OAS3 tests
* jsonParse utils for syntax highlighting
2021-04-20 11:39:05 -07:00
axel584
75865f31ec feat: download of text/csv now uses .csv extension (#7141) 2021-03-30 13:06:00 -07:00
Nicolas
13fea13397 fix(responseBody): json response highlighting (#6871)
Refs #6508 

* Add language prop to HighlightCode component

* Use language prop for JSON HighlightCode responses in response-body.jsx
2021-02-03 12:56:29 -08:00
Tim Lai
a73783b73d feat: syntax highlighting of code section (#6236)
Co-authored-by: AdrieanKhisbe <adriean.khisbe@live.fr>
2020-07-17 15:29:15 -07:00
Aldrin Abastillas
973e1f7a9b feat: Copy response to clipboard #4300 (#5278)
* Move next to download button and match styling

Co-authored-by: Aldrin Abastillas <AAbastillas@rcanalytics.com>
Co-authored-by: Tim Lai <timothy.lai@gmail.com>
2020-06-15 15:08:10 -07:00
tomdegoede
fc3ed30f3d improvement: Move inline styles to SCSS instead (#5578)
* fix: convert propStyle to propClass
2020-06-10 16:39:48 -07:00
Jamie Peabody
e8266a3c6d fix: code highlight styles are now only applied pre.microlight (#5673)
* patch(#5672): code highlight styles are now only applied to pre blocks that have the class pre.microlight

* fixed pre style appied to .request-url

* fixed response-headers and request-duration pre blocks

* made pre.microlight class as per review

* added microlight class to appropriate pre and added tests
2019-11-03 20:46:38 -05:00
Yann Savary
12e350fcad fix: incorrect usage of lodash.lowerCase (via #4200)
* Wrong usage of https://lodash.com/docs/4.17.5#lowerCase

* Add basic tests about ResponseBody Content-Type
2018-08-22 15:15:12 -07:00
kyle
ae849c31ea fix: remove outdated Safari check for Blob downloads (#4541) 2018-05-10 16:07:29 -07:00
Helder Sepulveda
8055129dd2 Improve downloadable HighlightCode filename (#4508)
* Update highlight-code.jsx
* improve filename no more response.txt
* use new `fileName` prop for file names
* use template strings for `fileName` prop values
* fall back to old "response.txt" file name if none is provided
2018-05-03 17:33:21 -07:00
kyle
9a121ea445 fix: attempt to display Blob response bodies as text (#4437)
* fix: attempt to display Blob response bodies as text

... if nothing else works.

* correctly pass `prevProps.content` to updateParsedContent

* remove debugger statement

* caniuse `Blob` && `FileReader`? yes.

Blob: https://caniuse.com/#search=Blob
FileReader: https://caniuse.com/#search=filereader
2018-04-13 16:16:54 -07:00
Giancarlo Klemm Camilo
2795518340 enhance: scrollable + downloadable HighlightCode (#4397)
* Auto hidding content that is longer than 600 characters long.

* Added basic downloading

Slightly broken

* Better downloading

now downloads file on button click

* Fix the angry linter

* Fix dist

* Removed collapsing, added scrolling.

* Code clean up.

* CSS fix.

* prevent HighlightCode from scrolling entire document

* center "Download" text in button

* `this.downloadJSON` -> `this.downloadText`

we're always saving as `.txt`, so JSON is a misnomer

* hide Download button behind option `downloadable` prop

* `file-saver` -> `js-file-download`
2018-04-12 18:18:49 -07:00
kovyfive
6f7a4c3097 fix: blob download in internet explorer (#4256) 2018-02-27 14:13:14 -08:00
kyle
efc1194e4a improve(response-rendering): give Content-Disposition priority (#4140)
* Remove produces/consumes setter from OperationContainer

* Store consumes/produces information in `meta` key

* Migrate produces value state usage to `meta` key

* use meta consumes data for isXml check

* Fix failing tests

* normalize action name casing

* restore correct produces fallback value logic

* default to first server if current server is invalid

* improve(response-rendering): give Content-Disposition render priority
2018-01-19 23:08:19 -06:00
Lukasr29
64f99356a5 improve(tio): extract file name from Content-Disposition (#4035)
* Added extraction of quoted file name from content disposition header

* Added extraction of quoted file name from content disposition header - PR Fixes

* Added extraction of quoted file name from content disposition header - PR Fixes

* Added extraction of quoted file name from content disposition header - PR Fixes
2018-01-11 19:39:42 -06:00
Helder Sepulveda
8becc9a9a7 Update response-body.jsx
Add support for svg images, with this change we will show an actual preview of the image
2017-12-11 15:14:58 -05:00
Conor Lennon
f929d4fdd6 Remove check that the response has a content-length when making a
download link available.
2017-11-12 20:35:15 +00:00
Kyle Shockey
d5d7e45d62 Indent XML with 2 spaces 2017-11-03 18:13:17 -07:00
Kyle Shockey
17e6d81504 Format XML with xml-but-prettier 2017-11-02 15:13:10 -07:00
Owen Conti
ec76e512e2 Fixes #3730
Add extra check for missing response content and contentType
2017-10-08 09:38:08 -06:00
Elvin Lemmens
ca1a0fa544 Apply conditions for generating download link correctly
Invalid application of AND/OR statements prevented file downloads of other types than application/octet-stream from generating a download link
2017-09-27 12:34:46 +02:00
Owen Conti
454e9af16b Added max-width style to scale down large images 2017-07-21 20:56:00 -06:00
Owen Conti
defc45f7a6 Fixes #3435 - Update image/ response types to create a proper blob url from the content returned. 2017-07-21 20:16:51 -06:00
shockey
b72aa3a7c8 Merge branch 'master' into webpack-migration-2.x 2017-06-29 18:23:36 -07:00
RVKen
d36f0a6dbd fix eslint issues 2017-06-29 04:37:19 +02:00
Owen Conti
b2d52e2629 Remove isRequired from ResponseBody's contentType property as responses without a Content-Type header will not have a value to pass 2017-06-25 16:10:14 -06:00
Ron
f22a628934 in with the new 2017-03-17 21:17:53 -07:00