v-openapi 0.0.1-alpha.0 → 0.2.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023-present Enzo Notario
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,39 @@
1
+ # v-openapi
2
+
3
+ Vue 3 components to render OpenAPI documents, with a playground and code samples. No VitePress needed.
4
+
5
+ Built on [vitepress-openapi](https://github.com/enzonotario/vitepress-openapi). [Docs](https://vitepress-openapi.vercel.app/guide/vue) · [Live demo](https://vitepress-openapi.vercel.app/standalone/).
6
+
7
+ ## Install
8
+
9
+ ```sh
10
+ npm install v-openapi
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ```ts
16
+ import { VOpenapi } from 'v-openapi'
17
+ import { createApp } from 'vue'
18
+ import App from './App.vue'
19
+ import spec from './openapi.json'
20
+ // Document styles first, then component styles.
21
+ import 'v-openapi/standalone.css'
22
+ import 'v-openapi/style.css'
23
+
24
+ createApp(App)
25
+ .use(VOpenapi, { spec })
26
+ .mount('#app')
27
+ ```
28
+
29
+ ```vue
30
+ <template>
31
+ <OAOperation operation-id="createArtist" />
32
+ </template>
33
+ ```
34
+
35
+ `OASpec`, `OAIntroduction`, `OAInfo` and `OAServers` work the same way. Build a sidebar with `useSidebar({ spec }).generateSidebarGroups()`, and switch dark mode with `useTheme().isDark`.
36
+
37
+ ## License
38
+
39
+ MIT
package/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from 'vitepress-openapi/vue'
package/index.js ADDED
@@ -0,0 +1,2 @@
1
+ // v-openapi is the Vue package. For now it re-exports the VitePress-free entry of vitepress-openapi.
2
+ export * from 'vitepress-openapi/vue'
package/package.json CHANGED
@@ -1,12 +1,43 @@
1
1
  {
2
2
  "name": "v-openapi",
3
- "version": "0.0.1-alpha.0",
4
- "main": "index.js",
5
- "scripts": {
6
- "test": "echo \"Error: no test specified\" && exit 1"
7
- },
8
- "keywords": [],
9
- "author": "",
3
+ "type": "module",
4
+ "version": "0.2.14",
5
+ "description": "Vue 3 components to render OpenAPI documents, with a playground and code samples.",
6
+ "author": "Enzo Notario <hi@enzonotario.me>",
10
7
  "license": "MIT",
11
- "description": ""
12
- }
8
+ "homepage": "https://vitepress-openapi.vercel.app/standalone/",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/enzonotario/vitepress-openapi.git",
12
+ "directory": "packages/v-openapi"
13
+ },
14
+ "keywords": [
15
+ "vue",
16
+ "openapi",
17
+ "swagger",
18
+ "api-documentation"
19
+ ],
20
+ "sideEffects": [
21
+ "*.css"
22
+ ],
23
+ "exports": {
24
+ ".": {
25
+ "types": "./index.d.ts",
26
+ "import": "./index.js"
27
+ },
28
+ "./style.css": "./style.css",
29
+ "./standalone.css": "./standalone.css"
30
+ },
31
+ "files": [
32
+ "index.d.ts",
33
+ "index.js",
34
+ "standalone.css",
35
+ "style.css"
36
+ ],
37
+ "peerDependencies": {
38
+ "vue": "^3.0.0"
39
+ },
40
+ "dependencies": {
41
+ "vitepress-openapi": "0.2.14"
42
+ }
43
+ }
package/standalone.css ADDED
@@ -0,0 +1,2 @@
1
+ /* Document styles for apps without VitePress. Load it before style.css. */
2
+ @import 'vitepress-openapi/dist/standalone.css';
package/style.css ADDED
@@ -0,0 +1,2 @@
1
+ /* Component styles. */
2
+ @import 'vitepress-openapi/dist/style.css';
package/package.json.save DELETED
@@ -1,12 +0,0 @@
1
- {
2
- "name": "json-",
3
- "version": "0.0.1-alpha.0",
4
- "main": "index.js",
5
- "scripts": {
6
- "test": "echo \"Error: no test specified\" && exit 1"
7
- },
8
- "keywords": [],
9
- "author": "",
10
- "license": "MIT",
11
- "description": ""
12
- }