nuxt-openapi-hyperfetch 0.1.6-alpha.1 โ†’ 0.1.8-alpha.1

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.
Files changed (79) hide show
  1. package/CONTRIBUTING.md +291 -292
  2. package/INSTRUCTIONS.md +327 -327
  3. package/LICENSE +202 -202
  4. package/README.md +231 -227
  5. package/dist/cli/logger.d.ts +26 -0
  6. package/dist/cli/logger.js +36 -0
  7. package/dist/cli/logo.js +6 -6
  8. package/dist/generators/components/connector-generator/generator.d.ts +12 -0
  9. package/dist/generators/components/connector-generator/generator.js +116 -0
  10. package/dist/generators/components/connector-generator/templates.d.ts +18 -0
  11. package/dist/generators/components/connector-generator/templates.js +222 -0
  12. package/dist/generators/components/connector-generator/types.d.ts +32 -0
  13. package/dist/generators/components/connector-generator/types.js +7 -0
  14. package/dist/generators/components/schema-analyzer/index.d.ts +17 -0
  15. package/dist/generators/components/schema-analyzer/index.js +20 -0
  16. package/dist/generators/components/schema-analyzer/intent-detector.d.ts +17 -0
  17. package/dist/generators/components/schema-analyzer/intent-detector.js +143 -0
  18. package/dist/generators/components/schema-analyzer/openapi-reader.d.ts +11 -0
  19. package/dist/generators/components/schema-analyzer/openapi-reader.js +76 -0
  20. package/dist/generators/components/schema-analyzer/resource-grouper.d.ts +6 -0
  21. package/dist/generators/components/schema-analyzer/resource-grouper.js +132 -0
  22. package/dist/generators/components/schema-analyzer/schema-field-mapper.d.ts +35 -0
  23. package/dist/generators/components/schema-analyzer/schema-field-mapper.js +220 -0
  24. package/dist/generators/components/schema-analyzer/types.d.ts +156 -0
  25. package/dist/generators/components/schema-analyzer/types.js +7 -0
  26. package/dist/generators/nuxt-server/generator.d.ts +2 -1
  27. package/dist/generators/nuxt-server/generator.js +21 -21
  28. package/dist/generators/shared/runtime/apiHelpers.d.ts +98 -41
  29. package/dist/generators/shared/runtime/apiHelpers.js +97 -104
  30. package/dist/generators/shared/runtime/pagination.d.ts +168 -0
  31. package/dist/generators/shared/runtime/pagination.js +179 -0
  32. package/dist/generators/shared/runtime/useDeleteConnector.d.ts +16 -0
  33. package/dist/generators/shared/runtime/useDeleteConnector.js +93 -0
  34. package/dist/generators/shared/runtime/useDetailConnector.d.ts +14 -0
  35. package/dist/generators/shared/runtime/useDetailConnector.js +50 -0
  36. package/dist/generators/shared/runtime/useFormConnector.d.ts +19 -0
  37. package/dist/generators/shared/runtime/useFormConnector.js +113 -0
  38. package/dist/generators/shared/runtime/useListConnector.d.ts +25 -0
  39. package/dist/generators/shared/runtime/useListConnector.js +125 -0
  40. package/dist/generators/shared/runtime/zod-error-merger.d.ts +23 -0
  41. package/dist/generators/shared/runtime/zod-error-merger.js +106 -0
  42. package/dist/generators/shared/templates/api-callbacks-plugin.js +54 -11
  43. package/dist/generators/shared/templates/api-pagination-plugin.d.ts +51 -0
  44. package/dist/generators/shared/templates/api-pagination-plugin.js +152 -0
  45. package/dist/generators/use-async-data/generator.d.ts +2 -1
  46. package/dist/generators/use-async-data/generator.js +14 -14
  47. package/dist/generators/use-async-data/runtime/useApiAsyncData.js +130 -17
  48. package/dist/generators/use-async-data/runtime/useApiAsyncDataRaw.js +103 -13
  49. package/dist/generators/use-async-data/templates.js +20 -14
  50. package/dist/generators/use-fetch/generator.d.ts +2 -1
  51. package/dist/generators/use-fetch/generator.js +12 -12
  52. package/dist/generators/use-fetch/runtime/useApiRequest.js +149 -40
  53. package/dist/generators/use-fetch/templates.js +14 -14
  54. package/dist/index.js +25 -0
  55. package/dist/module/index.d.ts +4 -0
  56. package/dist/module/index.js +93 -0
  57. package/dist/module/types.d.ts +27 -0
  58. package/dist/module/types.js +1 -0
  59. package/docs/API-REFERENCE.md +886 -887
  60. package/eslint.config.js +13 -0
  61. package/package.json +23 -2
  62. package/src/cli/config.ts +140 -140
  63. package/src/cli/logger.ts +124 -66
  64. package/src/cli/logo.ts +25 -25
  65. package/src/cli/types.ts +50 -50
  66. package/src/generators/nuxt-server/generator.ts +272 -270
  67. package/src/generators/shared/runtime/apiHelpers.ts +507 -481
  68. package/src/generators/shared/templates/api-callbacks-plugin.ts +352 -352
  69. package/src/generators/use-async-data/generator.ts +205 -204
  70. package/src/generators/use-async-data/runtime/useApiAsyncData.ts +229 -214
  71. package/src/generators/use-async-data/runtime/useApiAsyncDataRaw.ts +245 -230
  72. package/src/generators/use-async-data/templates.ts +257 -250
  73. package/src/generators/use-fetch/generator.ts +170 -169
  74. package/src/generators/use-fetch/runtime/useApiRequest.ts +234 -234
  75. package/src/generators/use-fetch/templates.ts +214 -214
  76. package/src/index.ts +265 -265
  77. package/src/module/index.ts +133 -0
  78. package/src/module/types.ts +31 -0
  79. package/src/generators/tanstack-query/generator.ts +0 -11
package/CONTRIBUTING.md CHANGED
@@ -1,292 +1,291 @@
1
- # Contributing to Nuxt Generator
2
-
3
- Thank you for your interest in contributing to Nuxt Generator! This document provides guidelines and instructions for contributing to the project.
4
-
5
- ## ๐Ÿ“‹ Prerequisites
6
-
7
- - **Node.js** >= 18.x
8
- - **npm** >= 9.x
9
- - **Git**
10
-
11
- ## ๐Ÿ“š Before You Start - Read the Documentation
12
-
13
- Before contributing, we highly recommend reading the technical documentation in the `docs/` directory:
14
-
15
- ### Essential Reading
16
-
17
- 1. **[Quick Start Guide](./docs/QUICK-START.md)** - Understand the project structure and core concepts
18
- - Project overview and architecture
19
- - Key files and their purposes
20
- - Most common tasks
21
-
22
- 2. **[Architecture Documentation](./docs/ARCHITECTURE.md)** - Understand design decisions
23
- - Why the codebase is structured this way
24
- - Core patterns (two-stage generation, wrapper pattern, shared code)
25
- - Design decisions (ADRs) with trade-offs explained
26
-
27
- 3. **[Development Guide](./docs/DEVELOPMENT.md)** - Practical development instructions
28
- - How to add features (new callbacks, generators, parser features)
29
- - Testing strategies
30
- - Code style guidelines
31
- - Debugging tips
32
-
33
- 4. **[API Reference](./docs/API-REFERENCE.md)** - Complete technical reference
34
- - All interfaces and types
35
- - Parser, template, and runtime APIs
36
- - Callback system documentation
37
-
38
- ### Quick Reference
39
-
40
- - Adding a new callback type? โ†’ See [Development Guide - Add a New Callback](./docs/DEVELOPMENT.md#add-a-new-callback-type)
41
- - Adding a new generator? โ†’ See [Development Guide - Add a New Generator](./docs/DEVELOPMENT.md#add-a-new-generator-type)
42
- - Parser not working? โ†’ See [Troubleshooting Guide](./docs/TROUBLESHOOTING.md#parser-not-finding-methods)
43
- - Understanding global callbacks? โ†’ See [Architecture - Global Callbacks](./docs/ARCHITECTURE.md#global-callbacks-deep-dive)
44
-
45
- ---
46
-
47
- ## ๐Ÿš€ Getting Started
48
-
49
- ### 1. Fork and Clone
50
-
51
- ```bash
52
- # Fork the repository on GitHub, then clone your fork
53
- git clone https://github.com/dmartindiaz/nuxt-openapi-hyperfetch.git
54
- cd nuxt-openapi-hyperfetch
55
- ```
56
-
57
- ### 2. Install Dependencies
58
-
59
- ```bash
60
- npm install
61
- ```
62
-
63
- ### 3. Build the Project
64
-
65
- ```bash
66
- npm run build
67
- ```
68
-
69
- ## ๐Ÿ› ๏ธ Development Workflow
70
-
71
- ### Available Scripts
72
-
73
- | Script | Description |
74
- | ---------------------- | ------------------------------------------------------- |
75
- | `npm run build` | Compile TypeScript to JavaScript |
76
- | `npm run start` | Build and run the CLI |
77
- | `npm run lint` | Check code for linting errors |
78
- | `npm run lint:fix` | Automatically fix linting errors |
79
- | `npm run format` | Format all code with Prettier |
80
- | `npm run format:check` | Check if code is formatted correctly |
81
- | `npm run type-check` | Run TypeScript type checking without building |
82
- | `npm run validate` | Run type-check + lint + format-check (pre-commit check) |
83
-
84
- ### Before Committing
85
-
86
- **Always run these commands before committing:**
87
-
88
- ```bash
89
- # Format code
90
- npm run format
91
-
92
- # Fix linting issues
93
- npm run lint:fix
94
-
95
- # Validate everything
96
- npm run validate
97
- ```
98
-
99
- ### Code Style
100
-
101
- We use **ESLint** and **Prettier** to maintain consistent code style across the project.
102
-
103
- #### ESLint Rules
104
-
105
- - **TypeScript strict mode** - All code must pass type checking
106
- - **No unused variables** - Prefix with `_` if intentionally unused
107
- - **Prefer const** - Use `const` over `let` when possible
108
- - **No var** - Always use `const` or `let`
109
- - **Explicit return types** - Recommended but not enforced
110
-
111
- #### Prettier Configuration
112
-
113
- - **Single quotes** - Use `'` instead of `"`
114
- - **Semicolons** - Always use semicolons
115
- - **Trailing commas** - ES5 style (objects, arrays)
116
- - **Print width** - 100 characters
117
- - **Tab width** - 2 spaces
118
- - **Line endings** - LF (Unix style)
119
-
120
- ### EditorConfig
121
-
122
- The project includes an `.editorconfig` file. Make sure your editor supports EditorConfig:
123
-
124
- - **VS Code**: Install "EditorConfig for VS Code" extension
125
- - **WebStorm/IntelliJ**: Built-in support
126
- - **Sublime**: Install "EditorConfig" package
127
- - **Vim**: Install "editorconfig-vim" plugin
128
-
129
- ## ๐Ÿ“ Pull Request Process
130
-
131
- ### 1. Create a Feature Branch
132
-
133
- ```bash
134
- git checkout -b feature/your-feature-name
135
- # or
136
- git checkout -b fix/your-bugfix-name
137
- ```
138
-
139
- ### 2. Make Your Changes
140
-
141
- - Write clean, readable code
142
- - Follow existing code patterns
143
- - Add comments for complex logic
144
- - Update documentation if needed
145
-
146
- ### 3. Test Your Changes
147
-
148
- ```bash
149
- # Build the project
150
- npm run build
151
-
152
- # Test generation with example
153
- npm run generator
154
-
155
- # Or test with specific swagger file
156
- node dist/index.js generate -i swagger.yaml -o ./test-output
157
- ```
158
-
159
- ### 4. Validate Your Code
160
-
161
- ```bash
162
- # Run all checks
163
- npm run validate
164
-
165
- # This runs:
166
- # - TypeScript type checking
167
- # - ESLint
168
- # - Prettier format check
169
- ```
170
-
171
- ### 5. Commit Your Changes
172
-
173
- Use clear, descriptive commit messages:
174
-
175
- ```bash
176
- # Good commit messages
177
- git commit -m "feat: add support for @tanstack/vue-query generator"
178
- git commit -m "fix: resolve path issues on Windows"
179
- git commit -m "docs: update README with global callbacks examples"
180
- git commit -m "refactor: extract common parser logic to shared module"
181
-
182
- # Follow conventional commits format
183
- # <type>: <description>
184
- # Types: feat, fix, docs, style, refactor, test, chore
185
- ```
186
-
187
- ### 6. Push and Create PR
188
-
189
- ```bash
190
- git push origin feature/your-feature-name
191
- ```
192
-
193
- Then create a Pull Request on GitHub with:
194
-
195
- - **Clear title** - What does this PR do?
196
- - **Description** - Why is this change needed?
197
- - **Testing** - How did you test it?
198
- - **Screenshots** - If applicable
199
-
200
- ## ๐Ÿ› Reporting Bugs
201
-
202
- When reporting bugs, please include:
203
-
204
- 1. **Description** - Clear description of the bug
205
- 2. **Steps to reproduce** - Minimal steps to reproduce the issue
206
- 3. **Expected behavior** - What you expected to happen
207
- 4. **Actual behavior** - What actually happened
208
- 5. **Environment**:
209
- - Node.js version: `node --version`
210
- - npm version: `npm --version`
211
- - OS: Windows/Mac/Linux
212
- 6. **Swagger file** - If possible, provide the OpenAPI/Swagger file that causes the issue
213
-
214
- ## ๐Ÿ’ก Suggesting Features
215
-
216
- Feature requests are welcome! Please include:
217
-
218
- 1. **Use case** - What problem does this solve?
219
- 2. **Proposed solution** - How should it work?
220
- 3. **Alternatives** - Have you considered other approaches?
221
- 4. **Examples** - Code examples if applicable
222
-
223
- ## ๐Ÿ“‚ Project Structure
224
-
225
- ```
226
- nuxt-generator/
227
- โ”œโ”€โ”€ src/
228
- โ”‚ โ”œโ”€โ”€ index.ts # CLI entry point
229
- โ”‚ โ”œโ”€โ”€ generate.ts # OpenAPI generator wrapper
230
- โ”‚ โ”œโ”€โ”€ cli/ # CLI utilities (prompts, logger, logo)
231
- โ”‚ โ””โ”€โ”€ generators/
232
- โ”‚ โ”œโ”€โ”€ shared/ # Shared types and runtime helpers
233
- โ”‚ โ”œโ”€โ”€ use-fetch/ # useFetch generator
234
- โ”‚ โ”œโ”€โ”€ use-async-data/ # useAsyncData generator
235
- โ”‚ โ”œโ”€โ”€ nuxt-server/ # Nuxt Server Routes generator
236
- โ”‚ โ””โ”€โ”€ tanstack-query/ # TanStack Query generator (TODO)
237
- โ”œโ”€โ”€ dist/ # Compiled output
238
- โ”œโ”€โ”€ eslint.config.js # ESLint configuration
239
- โ”œโ”€โ”€ .prettierrc.json # Prettier configuration
240
- โ”œโ”€โ”€ .editorconfig # Editor configuration
241
- โ”œโ”€โ”€ tsconfig.json # TypeScript configuration
242
- โ”œโ”€โ”€ INSTRUCTIONS.md # Detailed technical documentation
243
- โ””โ”€โ”€ README.md # User documentation
244
- ```
245
-
246
- ## ๐Ÿงช Testing
247
-
248
- ### Manual Testing
249
-
250
- 1. Generate composables from example swagger.yaml:
251
-
252
- ```bash
253
- npm run generator
254
- ```
255
-
256
- 2. Test different generators:
257
-
258
- ```bash
259
- # useFetch
260
- echo useFetch | npm run generator
261
-
262
- # useAsyncData
263
- echo useAsyncData | npm run generator
264
-
265
- # Nuxt Server Routes
266
- echo nuxtServer | npm run generator
267
- ```
268
-
269
- 3. Verify generated code compiles in a Nuxt project
270
-
271
- ### Future: Automated Tests
272
-
273
- We plan to add automated tests in the future. Contributions welcome!
274
-
275
- ## โ“ Questions?
276
-
277
- - **Documentation**: Read the comprehensive docs in the `docs/` directory:
278
- - [Quick Start](./docs/QUICK-START.md) - Project overview and core concepts
279
- - [Architecture](./docs/ARCHITECTURE.md) - Design patterns and decisions
280
- - [Development Guide](./docs/DEVELOPMENT.md) - How to extend and contribute
281
- - [API Reference](./docs/API-REFERENCE.md) - Complete technical reference
282
- - [Troubleshooting](./docs/TROUBLESHOOTING.md) - Common issues and solutions
283
- - **Issues**: Search [existing issues](https://github.com/dmartindiaz/nuxt-openapi-hyperfetch/issues)
284
- - **Discussions**: Start a [discussion](https://github.com/dmartindiaz/nuxt-openapi-hyperfetch/discussions)
285
-
286
- ## ๐Ÿ“„ License
287
-
288
- By contributing, you agree that your contributions will be licensed under the Apache-2.0 License.
289
-
290
- ---
291
-
292
- **Happy coding! ๐Ÿš€**
1
+ # Contributing to Nuxt Generator
2
+
3
+ Thank you for your interest in contributing to Nuxt Generator! This document provides guidelines and instructions for contributing to the project.
4
+
5
+ ## ๐Ÿ“‹ Prerequisites
6
+
7
+ - **Node.js** >= 18.x
8
+ - **npm** >= 9.x
9
+ - **Git**
10
+
11
+ ## ๐Ÿ“š Before You Start - Read the Documentation
12
+
13
+ Before contributing, we highly recommend reading the technical documentation in the `docs/` directory:
14
+
15
+ ### Essential Reading
16
+
17
+ 1. **[Quick Start Guide](./docs/QUICK-START.md)** - Understand the project structure and core concepts
18
+ - Project overview and architecture
19
+ - Key files and their purposes
20
+ - Most common tasks
21
+
22
+ 2. **[Architecture Documentation](./docs/ARCHITECTURE.md)** - Understand design decisions
23
+ - Why the codebase is structured this way
24
+ - Core patterns (two-stage generation, wrapper pattern, shared code)
25
+ - Design decisions (ADRs) with trade-offs explained
26
+
27
+ 3. **[Development Guide](./docs/DEVELOPMENT.md)** - Practical development instructions
28
+ - How to add features (new callbacks, generators, parser features)
29
+ - Testing strategies
30
+ - Code style guidelines
31
+ - Debugging tips
32
+
33
+ 4. **[API Reference](./docs/API-REFERENCE.md)** - Complete technical reference
34
+ - All interfaces and types
35
+ - Parser, template, and runtime APIs
36
+ - Callback system documentation
37
+
38
+ ### Quick Reference
39
+
40
+ - Adding a new callback type? โ†’ See [Development Guide - Add a New Callback](./docs/DEVELOPMENT.md#add-a-new-callback-type)
41
+ - Adding a new generator? โ†’ See [Development Guide - Add a New Generator](./docs/DEVELOPMENT.md#add-a-new-generator-type)
42
+ - Parser not working? โ†’ See [Troubleshooting Guide](./docs/TROUBLESHOOTING.md#parser-not-finding-methods)
43
+ - Understanding global callbacks? โ†’ See [Architecture - Global Callbacks](./docs/ARCHITECTURE.md#global-callbacks-deep-dive)
44
+
45
+ ---
46
+
47
+ ## ๐Ÿš€ Getting Started
48
+
49
+ ### 1. Fork and Clone
50
+
51
+ ```bash
52
+ # Fork the repository on GitHub, then clone your fork
53
+ git clone https://github.com/dmartindiaz/nuxt-openapi-hyperfetch.git
54
+ cd nuxt-openapi-hyperfetch
55
+ ```
56
+
57
+ ### 2. Install Dependencies
58
+
59
+ ```bash
60
+ npm install
61
+ ```
62
+
63
+ ### 3. Build the Project
64
+
65
+ ```bash
66
+ npm run build
67
+ ```
68
+
69
+ ## ๐Ÿ› ๏ธ Development Workflow
70
+
71
+ ### Available Scripts
72
+
73
+ | Script | Description |
74
+ | ---------------------- | ------------------------------------------------------- |
75
+ | `npm run build` | Compile TypeScript to JavaScript |
76
+ | `npm run start` | Build and run the CLI |
77
+ | `npm run lint` | Check code for linting errors |
78
+ | `npm run lint:fix` | Automatically fix linting errors |
79
+ | `npm run format` | Format all code with Prettier |
80
+ | `npm run format:check` | Check if code is formatted correctly |
81
+ | `npm run type-check` | Run TypeScript type checking without building |
82
+ | `npm run validate` | Run type-check + lint + format-check (pre-commit check) |
83
+
84
+ ### Before Committing
85
+
86
+ **Always run these commands before committing:**
87
+
88
+ ```bash
89
+ # Format code
90
+ npm run format
91
+
92
+ # Fix linting issues
93
+ npm run lint:fix
94
+
95
+ # Validate everything
96
+ npm run validate
97
+ ```
98
+
99
+ ### Code Style
100
+
101
+ We use **ESLint** and **Prettier** to maintain consistent code style across the project.
102
+
103
+ #### ESLint Rules
104
+
105
+ - **TypeScript strict mode** - All code must pass type checking
106
+ - **No unused variables** - Prefix with `_` if intentionally unused
107
+ - **Prefer const** - Use `const` over `let` when possible
108
+ - **No var** - Always use `const` or `let`
109
+ - **Explicit return types** - Recommended but not enforced
110
+
111
+ #### Prettier Configuration
112
+
113
+ - **Single quotes** - Use `'` instead of `"`
114
+ - **Semicolons** - Always use semicolons
115
+ - **Trailing commas** - ES5 style (objects, arrays)
116
+ - **Print width** - 100 characters
117
+ - **Tab width** - 2 spaces
118
+ - **Line endings** - LF (Unix style)
119
+
120
+ ### EditorConfig
121
+
122
+ The project includes an `.editorconfig` file. Make sure your editor supports EditorConfig:
123
+
124
+ - **VS Code**: Install "EditorConfig for VS Code" extension
125
+ - **WebStorm/IntelliJ**: Built-in support
126
+ - **Sublime**: Install "EditorConfig" package
127
+ - **Vim**: Install "editorconfig-vim" plugin
128
+
129
+ ## ๐Ÿ“ Pull Request Process
130
+
131
+ ### 1. Create a Feature Branch
132
+
133
+ ```bash
134
+ git checkout -b feature/your-feature-name
135
+ # or
136
+ git checkout -b fix/your-bugfix-name
137
+ ```
138
+
139
+ ### 2. Make Your Changes
140
+
141
+ - Write clean, readable code
142
+ - Follow existing code patterns
143
+ - Add comments for complex logic
144
+ - Update documentation if needed
145
+
146
+ ### 3. Test Your Changes
147
+
148
+ ```bash
149
+ # Build the project
150
+ npm run build
151
+
152
+ # Test generation with example
153
+ npm run generator
154
+
155
+ # Or test with specific swagger file
156
+ node dist/index.js generate -i swagger.yaml -o ./test-output
157
+ ```
158
+
159
+ ### 4. Validate Your Code
160
+
161
+ ```bash
162
+ # Run all checks
163
+ npm run validate
164
+
165
+ # This runs:
166
+ # - TypeScript type checking
167
+ # - ESLint
168
+ # - Prettier format check
169
+ ```
170
+
171
+ ### 5. Commit Your Changes
172
+
173
+ Use clear, descriptive commit messages:
174
+
175
+ ```bash
176
+ # Good commit messages
177
+ git commit -m "feat: add support for x generator"
178
+ git commit -m "fix: resolve path issues on Windows"
179
+ git commit -m "docs: update README with global callbacks examples"
180
+ git commit -m "refactor: extract common parser logic to shared module"
181
+
182
+ # Follow conventional commits format
183
+ # <type>: <description>
184
+ # Types: feat, fix, docs, style, refactor, test, chore
185
+ ```
186
+
187
+ ### 6. Push and Create PR
188
+
189
+ ```bash
190
+ git push origin feature/your-feature-name
191
+ ```
192
+
193
+ Then create a Pull Request on GitHub with:
194
+
195
+ - **Clear title** - What does this PR do?
196
+ - **Description** - Why is this change needed?
197
+ - **Testing** - How did you test it?
198
+ - **Screenshots** - If applicable
199
+
200
+ ## ๐Ÿ› Reporting Bugs
201
+
202
+ When reporting bugs, please include:
203
+
204
+ 1. **Description** - Clear description of the bug
205
+ 2. **Steps to reproduce** - Minimal steps to reproduce the issue
206
+ 3. **Expected behavior** - What you expected to happen
207
+ 4. **Actual behavior** - What actually happened
208
+ 5. **Environment**:
209
+ - Node.js version: `node --version`
210
+ - npm version: `npm --version`
211
+ - OS: Windows/Mac/Linux
212
+ 6. **Swagger file** - If possible, provide the OpenAPI/Swagger file that causes the issue
213
+
214
+ ## ๐Ÿ’ก Suggesting Features
215
+
216
+ Feature requests are welcome! Please include:
217
+
218
+ 1. **Use case** - What problem does this solve?
219
+ 2. **Proposed solution** - How should it work?
220
+ 3. **Alternatives** - Have you considered other approaches?
221
+ 4. **Examples** - Code examples if applicable
222
+
223
+ ## ๐Ÿ“‚ Project Structure
224
+
225
+ ```
226
+ nuxt-generator/
227
+ โ”œโ”€โ”€ src/
228
+ โ”‚ โ”œโ”€โ”€ index.ts # CLI entry point
229
+ โ”‚ โ”œโ”€โ”€ generate.ts # OpenAPI generator wrapper
230
+ โ”‚ โ”œโ”€โ”€ cli/ # CLI utilities (prompts, logger, logo)
231
+ โ”‚ โ””โ”€โ”€ generators/
232
+ โ”‚ โ”œโ”€โ”€ shared/ # Shared types and runtime helpers
233
+ โ”‚ โ”œโ”€โ”€ use-fetch/ # useFetch generator
234
+ โ”‚ โ”œโ”€โ”€ use-async-data/ # useAsyncData generator
235
+ โ”‚ โ”œโ”€โ”€ nuxt-server/ # Nuxt Server Routes generator
236
+ โ”œโ”€โ”€ dist/ # Compiled output
237
+ โ”œโ”€โ”€ eslint.config.js # ESLint configuration
238
+ โ”œโ”€โ”€ .prettierrc.json # Prettier configuration
239
+ โ”œโ”€โ”€ .editorconfig # Editor configuration
240
+ โ”œโ”€โ”€ tsconfig.json # TypeScript configuration
241
+ โ”œโ”€โ”€ INSTRUCTIONS.md # Detailed technical documentation
242
+ โ””โ”€โ”€ README.md # User documentation
243
+ ```
244
+
245
+ ## ๐Ÿงช Testing
246
+
247
+ ### Manual Testing
248
+
249
+ 1. Generate composables from example swagger.yaml:
250
+
251
+ ```bash
252
+ npm run generator
253
+ ```
254
+
255
+ 2. Test different generators:
256
+
257
+ ```bash
258
+ # useFetch
259
+ echo useFetch | npm run generator
260
+
261
+ # useAsyncData
262
+ echo useAsyncData | npm run generator
263
+
264
+ # Nuxt Server Routes
265
+ echo nuxtServer | npm run generator
266
+ ```
267
+
268
+ 3. Verify generated code compiles in a Nuxt project
269
+
270
+ ### Future: Automated Tests
271
+
272
+ We plan to add automated tests in the future. Contributions welcome!
273
+
274
+ ## โ“ Questions?
275
+
276
+ - **Documentation**: Read the comprehensive docs in the `docs/` directory:
277
+ - [Quick Start](./docs/QUICK-START.md) - Project overview and core concepts
278
+ - [Architecture](./docs/ARCHITECTURE.md) - Design patterns and decisions
279
+ - [Development Guide](./docs/DEVELOPMENT.md) - How to extend and contribute
280
+ - [API Reference](./docs/API-REFERENCE.md) - Complete technical reference
281
+ - [Troubleshooting](./docs/TROUBLESHOOTING.md) - Common issues and solutions
282
+ - **Issues**: Search [existing issues](https://github.com/dmartindiaz/nuxt-openapi-hyperfetch/issues)
283
+ - **Discussions**: Start a [discussion](https://github.com/dmartindiaz/nuxt-openapi-hyperfetch/discussions)
284
+
285
+ ## ๐Ÿ“„ License
286
+
287
+ By contributing, you agree that your contributions will be licensed under the Apache-2.0 License.
288
+
289
+ ---
290
+
291
+ **Happy coding! ๐Ÿš€**