@eventcatalog/create-eventcatalog 2.2.0 → 2.2.2

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 (31) hide show
  1. package/dist/index.js +20 -4
  2. package/package.json +1 -1
  3. package/templates/asyncapi/Dockerfile +23 -0
  4. package/templates/asyncapi/README-template.md +1 -0
  5. package/templates/asyncapi/asyncapi-files/messages/user-signed-up.yml +44 -0
  6. package/templates/asyncapi/asyncapi-files/orders-service.yml +272 -0
  7. package/templates/asyncapi/asyncapi-files/payment-service.yml +245 -0
  8. package/templates/asyncapi/asyncapi-files/user-service.yml +23 -0
  9. package/templates/asyncapi/dockerignore +8 -0
  10. package/templates/asyncapi/eventcatalog.config.js +55 -0
  11. package/templates/asyncapi/eventcatalog.styles.css +1 -0
  12. package/templates/asyncapi/gitignore +24 -0
  13. package/templates/asyncapi/npmrc +1 -0
  14. package/templates/asyncapi/public/logo.png +0 -0
  15. package/templates/default/npmrc +1 -0
  16. package/templates/empty/npmrc +1 -0
  17. package/templates/index.ts +11 -0
  18. package/templates/openapi/Dockerfile +23 -0
  19. package/templates/openapi/README-template.md +1 -0
  20. package/templates/openapi/dockerignore +8 -0
  21. package/templates/openapi/eventcatalog.config.js +60 -0
  22. package/templates/openapi/eventcatalog.styles.css +1 -0
  23. package/templates/openapi/gitignore +24 -0
  24. package/templates/openapi/npmrc +1 -0
  25. package/templates/openapi/openapi-files/cart-api.yml +107 -0
  26. package/templates/openapi/openapi-files/order-api.yml +148 -0
  27. package/templates/openapi/openapi-files/order-history.yml +93 -0
  28. package/templates/openapi/openapi-files/payment-api.yml +74 -0
  29. package/templates/openapi/openapi-files/product-api.yml +68 -0
  30. package/templates/openapi/public/logo.png +0 -0
  31. package/templates/types.ts +1 -1
@@ -0,0 +1,68 @@
1
+ openapi: 3.0.0
2
+ info:
3
+ title: Product API
4
+ description: API for managing and retrieving product details in the shopping application.
5
+ version: 1.0.0
6
+ servers:
7
+ - url: https://api.yourshoppingapp.com/products
8
+ description: Product API Server
9
+ paths:
10
+ /:
11
+ get:
12
+ summary: List all products
13
+ description: Retrieve a list of all available products.
14
+ x-eventcatalog-message-type: query
15
+ operationId: listProducts
16
+ responses:
17
+ '200':
18
+ description: A list of products
19
+ content:
20
+ application/json:
21
+ schema:
22
+ type: array
23
+ items:
24
+ $ref: '#/components/schemas/Product'
25
+ /{productId}:
26
+ get:
27
+ summary: Get a product by ID
28
+ description: Retrieve details of a specific product by its ID.
29
+ x-eventcatalog-message-type: query
30
+ operationId: getProductById
31
+ parameters:
32
+ - name: productId
33
+ in: path
34
+ required: true
35
+ schema:
36
+ type: string
37
+ responses:
38
+ '200':
39
+ description: A single product
40
+ content:
41
+ application/json:
42
+ schema:
43
+ $ref: '#/components/schemas/Product'
44
+ '404':
45
+ description: Product not found
46
+ components:
47
+ schemas:
48
+ Product:
49
+ type: object
50
+ properties:
51
+ id:
52
+ type: string
53
+ name:
54
+ type: string
55
+ description:
56
+ type: string
57
+ price:
58
+ type: number
59
+ format: float
60
+ category:
61
+ type: string
62
+ imageUrl:
63
+ type: string
64
+ required:
65
+ - id
66
+ - name
67
+ - price
68
+ - category
@@ -1,6 +1,6 @@
1
1
  import { PackageManager } from "../helpers/get-pkg-manager";
2
2
 
3
- export type TemplateType = "default" | "app" | "empty";
3
+ export type TemplateType = "default" | "app" | "empty" | "asyncapi" | "openapi";
4
4
  export type TemplateMode = "js" | "ts";
5
5
 
6
6
  export interface GetTemplateFileArgs {