From e5821e766cbffe71be3d28bfe6917e64bdf73591 Mon Sep 17 00:00:00 2001 From: Adam Bem Date: Wed, 15 Nov 2023 13:35:21 +0100 Subject: [PATCH] Separated gui details into separated component --- .../src/components/man/ElementDescription.vue | 18 +++++++++++ .../components/man/RestMockManComponent.vue | 31 +++++++------------ 2 files changed, 29 insertions(+), 20 deletions(-) create mode 100644 Frontend/src/components/man/ElementDescription.vue diff --git a/Frontend/src/components/man/ElementDescription.vue b/Frontend/src/components/man/ElementDescription.vue new file mode 100644 index 0000000..1cd9c8e --- /dev/null +++ b/Frontend/src/components/man/ElementDescription.vue @@ -0,0 +1,18 @@ + + + \ No newline at end of file diff --git a/Frontend/src/components/man/RestMockManComponent.vue b/Frontend/src/components/man/RestMockManComponent.vue index 2795bc1..82f6027 100644 --- a/Frontend/src/components/man/RestMockManComponent.vue +++ b/Frontend/src/components/man/RestMockManComponent.vue @@ -1,6 +1,8 @@ @@ -15,7 +17,7 @@ import ImgMan from './ImgMan.vue';

Its main functions are:

GUI elements

-

URL field

-

This field contains autogenerated URL for your REST Mock. All links are removed every 24h.{check}

+

+ This field contains autogenerated URL for your REST Mock. All links are removed every 24h. + Applies every change made on this page and saves it between sessions. + Its just convenient way to set "Content-Type" header in the response. + This field sets HTTP status that will be sent to client. Any valid HTTP status can be used, by default it's 200 OK. + Here you can set response body. This is sophisticated text editor with syntax-highlighting based on detected language. It works both with JSON and XML data. + This section contains three default and unremovable headers ("Connection", "Date", "Keep-Alive") as well as empty field used to adding custom header. Adding header with empty value is possible, but every header has to have a name. When adding new header is possible, the "Add" button becomes active. New header is added after "Add" button is clicked. + This section allows to look into history of requests sent to current REST Mock. Entries are sorted by descending by date (newer are first). If request has body, "Show body" button appears in its entry. Also there is option to look into every request's headers by clicking "Show Headers" button. For now, History doesn't refresh automatically. To refresh it, click small refresh button on the right-hand side. -

"Save" button

-

Applies every change made on this page and saves it between sessions.

-

Response Content Type field

-

Its just convenient way to set "Content-Type" header in the response.

- -

Response HTTP Status field

-

This field sets HTTP status that will be sent to client. Any valid HTTP status can be used, by default it's 200 OK.

- -

Response Body field

-

Here you can set response body. This is sophisticated text editor with syntax-highlighting based on detected language. It works both with JSON and XML data.

- -

Response Headers section

-

This section contains three default and unremovable headers ("Connection", "Date", "Keep-Alive") as well as empty field used to adding custom header. Adding header with empty value is possible, but every header has to have a name. When adding new header is possible, the "Add" button becomes active. New header is added after "Add" button is clicked.

- -

History

-

This section allows to look into history of requests sent to current REST Mock. Entries are sorted by descending by date (newer are first). If request has body, "Show body" button appears in its entry. Also there is option to look into every request's headers by clicking "Show Headers" button. For now, History doesn't refresh automatically. To refresh it, click small refresh button on the right-hand side.

-

Example

Let's say we want to create temporary endpoint that returns code 200 with body:

{