diff --git a/assets/md/docs.md b/assets/md/docs.md
new file mode 100644
index 000000000..1b3185012
--- /dev/null
+++ b/assets/md/docs.md
@@ -0,0 +1,221 @@
+{{#collections}}
+
+# {{name}}
+
+## {{#folders}}
+
+## Folder: {{name}}
+
+{{#requests}}
+
+### {{name}}
+
+**Method**: {{method}}
+
+**RequestURL**: `{{{url}}}{{{path}}}`
+
+{{#isHeaders}}
+**Headers**:
+
+
+
+| Key |
+Value |
+
+{{#headers}}
+
+| {{{key}}} |
+`{{{value}}}` |
+
+{{/headers}}
+
+{{/isHeaders}}
+
+{{#isParams}}
+**Params**:
+
+
+
+| type |
+Key |
+Value |
+
+{{#params}}
+
+| {{type}} |
+{{{key}}} |
+{{{value}}} |
+
+{{/params}}
+
+{{/isParams}}
+
+{{#isAuth}}
+**Authentication Type**: {{{auth}}}
+{{/isAuth}}
+
+{{#bearerToken}}
+**BearerToken**: `{{{.}}}`
+{{/bearerToken}}
+
+{{#isAuthBasic}}
+Username: `{{{httpUser}}}`
+Password: `{{{httpPassword}}}`
+{{/isAuthBasic}}
+
+{{#isRawParams}}
+**RawParams**:
+
+```json
+{{{rawParams}}}
+```
+
+{{/isRawParams}}
+
+{{#contentType}}
+**ContentType**: `{{{contentType}}}`
+{{/contentType}}
+
+{{#preRequestScript}}
+**Pre Request Script**:
+
+```js
+{
+ {
+ {
+ preRequestScript
+ }
+ }
+}
+```
+
+{{/preRequestScript}}
+
+{{#testScript}}
+**Test Script**:
+
+```js
+{
+ {
+ {
+ testScript
+ }
+ }
+}
+```
+
+{{/testScript}}
+
+{{/requests}}
+
+---
+
+{{/folders}}
+
+{{#requests}}
+
+## {{name}}
+
+**Method**: {{method}}
+
+**RequestURL**: `{{{url}}}{{{path}}}`
+
+{{#isHeaders}}
+**Headers**:
+
+
+
+| Key |
+Value |
+
+{{#headers}}
+
+| {{{key}}} |
+`{{{value}}}` |
+
+{{/headers}}
+
+{{/isHeaders}}
+
+{{#isParams}}
+**Params**:
+
+
+
+| type |
+Key |
+Value |
+
+{{#params}}
+
+| {{type}} |
+{{{key}}} |
+{{{value}}} |
+
+{{/params}}
+
+{{/isParams}}
+
+{{#isAuth}}
+**Authentication Type**: {{{auth}}}
+{{/isAuth}}
+
+{{#bearerToken}}
+**BearerToken**: `{{{.}}}`
+{{/bearerToken}}
+
+{{#isAuthBasic}}
+Username: `{{{httpUser}}}`
+Password: `{{{httpPassword}}}`
+{{/isAuthBasic}}
+
+{{#isRawParams}}
+**RawParams**:
+
+```json
+{{{rawParams}}}
+```
+
+{{/isRawParams}}
+
+{{#contentType}}
+**ContentType**: `{{{contentType}}}`
+{{/contentType}}
+
+{{#preRequestScript}}
+**Pre Request Script**:
+
+```js
+{
+ {
+ {
+ preRequestScript
+ }
+ }
+}
+```
+
+{{/preRequestScript}}
+
+{{#testScript}}
+**Test Script**:
+
+```js
+{
+ {
+ {
+ testScript
+ }
+ }
+}
+```
+
+{{/testScript}}
+
+{{/requests}}
+
+{{/collections}}
+
+---
+
+Made with [Hoppscotch](https://github.com/hoppscotch/hoppscotch)
diff --git a/nuxt.config.js b/nuxt.config.js
index 27e06e709..446c960ef 100644
--- a/nuxt.config.js
+++ b/nuxt.config.js
@@ -321,6 +321,11 @@ export default {
use: { loader: "worker-loader" },
exclude: /(node_modules)/,
})
+ config.module.rules.push({
+ test: /\.md$/i,
+ use: { loader: "raw-loader" },
+ exclude: /(node_modules)/,
+ })
}
},
parallel: true,
diff --git a/package-lock.json b/package-lock.json
index 8b1dc5632..a1d0e49f0 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -3382,6 +3382,11 @@
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz",
"integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s="
+ },
+ "mustache": {
+ "version": "2.3.2",
+ "resolved": "https://registry.npmjs.org/mustache/-/mustache-2.3.2.tgz",
+ "integrity": "sha512-KpMNwdQsYz3O/SBS1qJ/o3sqUJ5wSb8gb0pul8CO0S56b9Y2ALm8zCfsjPXsqGFfoNBkDwZuZIAjhsZI03gYVQ=="
}
}
},
@@ -11454,9 +11459,9 @@
}
},
"mustache": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/mustache/-/mustache-2.3.2.tgz",
- "integrity": "sha512-KpMNwdQsYz3O/SBS1qJ/o3sqUJ5wSb8gb0pul8CO0S56b9Y2ALm8zCfsjPXsqGFfoNBkDwZuZIAjhsZI03gYVQ=="
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.0.1.tgz",
+ "integrity": "sha512-yL5VE97+OXn4+Er3THSmTdCFCtx5hHWzrolvH+JObZnUYwuaG7XV+Ch4fR2cIrcYI0tFHxS7iyFYl14bW8y2sA=="
},
"mute-stream": {
"version": "0.0.8",
@@ -13914,6 +13919,52 @@
"unpipe": "1.0.0"
}
},
+ "raw-loader": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-4.0.2.tgz",
+ "integrity": "sha512-ZnScIV3ag9A4wPX/ZayxL/jZH+euYb6FcUinPcgiQW0+UBtEv0O6Q3lGd3cqJ+GHH+rksEv3Pj99oxJ3u3VIKA==",
+ "dev": true,
+ "requires": {
+ "loader-utils": "^2.0.0",
+ "schema-utils": "^3.0.0"
+ },
+ "dependencies": {
+ "ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ }
+ },
+ "loader-utils": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
+ "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
+ "dev": true,
+ "requires": {
+ "big.js": "^5.2.2",
+ "emojis-list": "^3.0.0",
+ "json5": "^2.1.2"
+ }
+ },
+ "schema-utils": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz",
+ "integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==",
+ "dev": true,
+ "requires": {
+ "@types/json-schema": "^7.0.6",
+ "ajv": "^6.12.5",
+ "ajv-keywords": "^3.5.2"
+ }
+ }
+ }
+ },
"rc9": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/rc9/-/rc9-1.2.0.tgz",
diff --git a/package.json b/package.json
index 8acf20b01..9c2105fbf 100644
--- a/package.json
+++ b/package.json
@@ -33,6 +33,7 @@
"firebase": "^8.1.2",
"graphql": "^15.4.0",
"graphql-language-service-interface": "^2.4.3",
+ "mustache": "^4.0.1",
"nuxt": "^2.14.10",
"nuxt-i18n": "^6.15.4",
"paho-mqtt": "^1.1.0",
@@ -62,6 +63,7 @@
"jest-serializer-vue": "^2.0.2",
"prettier": "^2.2.1",
"pretty-quick": "^3.1.0",
+ "raw-loader": "^4.0.2",
"sass": "^1.30.0",
"sass-loader": "^10.1.0",
"vue-jest": "^3.0.7",
diff --git a/pages/doc.vue b/pages/doc.vue
index c4f403587..b93af4b52 100644
--- a/pages/doc.vue
+++ b/pages/doc.vue
@@ -72,6 +72,28 @@
{{ $t("generate_docs_first") }}
+
+
+
+
+
@@ -147,9 +169,9 @@
-
{{ $t("payload") }}
-
-
+
{{ $t("payload") }}
+
+
{{ payload.key || $t("none") }}:
{{ payload.value || $t("none") }}
@@ -243,9 +265,9 @@
- {{ $t("payload") }}
-
-
+
{{ $t("payload") }}
+
+
{{ payload.key || $t("none") }}:
{{ payload.value || $t("none") }}
@@ -292,27 +314,27 @@
@apply flex-col;
@apply justify-center;
@apply flex-1;
- @apply p-8;
+ @apply p-4;
.material-icons {
- @apply mr-8;
+ @apply mr-4;
}
}
.folder {
@apply border-l;
@apply border-brdColor;
- @apply mt-8;
+ @apply mt-4;
}
.request {
@apply border;
@apply border-brdColor;
@apply rounded-lg;
- @apply mt-8;
+ @apply mt-4;
h4 {
- @apply mt-8;
+ @apply mt-4;
}
}
@@ -330,16 +352,53 @@