@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.
- package/dist/index.js +20 -4
- package/package.json +1 -1
- package/templates/asyncapi/Dockerfile +23 -0
- package/templates/asyncapi/README-template.md +1 -0
- package/templates/asyncapi/asyncapi-files/messages/user-signed-up.yml +44 -0
- package/templates/asyncapi/asyncapi-files/orders-service.yml +272 -0
- package/templates/asyncapi/asyncapi-files/payment-service.yml +245 -0
- package/templates/asyncapi/asyncapi-files/user-service.yml +23 -0
- package/templates/asyncapi/dockerignore +8 -0
- package/templates/asyncapi/eventcatalog.config.js +55 -0
- package/templates/asyncapi/eventcatalog.styles.css +1 -0
- package/templates/asyncapi/gitignore +24 -0
- package/templates/asyncapi/npmrc +1 -0
- package/templates/asyncapi/public/logo.png +0 -0
- package/templates/default/npmrc +1 -0
- package/templates/empty/npmrc +1 -0
- package/templates/index.ts +11 -0
- package/templates/openapi/Dockerfile +23 -0
- package/templates/openapi/README-template.md +1 -0
- package/templates/openapi/dockerignore +8 -0
- package/templates/openapi/eventcatalog.config.js +60 -0
- package/templates/openapi/eventcatalog.styles.css +1 -0
- package/templates/openapi/gitignore +24 -0
- package/templates/openapi/npmrc +1 -0
- package/templates/openapi/openapi-files/cart-api.yml +107 -0
- package/templates/openapi/openapi-files/order-api.yml +148 -0
- package/templates/openapi/openapi-files/order-history.yml +93 -0
- package/templates/openapi/openapi-files/payment-api.yml +74 -0
- package/templates/openapi/openapi-files/product-api.yml +68 -0
- package/templates/openapi/public/logo.png +0 -0
- 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
|
|
Binary file
|
package/templates/types.ts
CHANGED
|
@@ -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 {
|