Build customers-api REST layer (Layer 3), mirroring catalog-api
8 routes over Customer + orders/payments sub-resources, proxying to classic-models-api. openid-connect with RFC 8693 token exchange to classic-models-api audience, rate-limiting, proxy-cache, audit-log — same plugin set and structure as catalog-api's REST surface. Not deployed: dev/gitrepository.yaml points at a gitea repo that doesn't exist yet (kong-customers-api.git, 404). No MCP layer yet either, unlike catalog-api.
This commit is contained in:
@@ -0,0 +1,159 @@
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongRoute
|
||||
metadata:
|
||||
name: ${NAME}-customers-api-listcustomers
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
serviceRef:
|
||||
type: namespacedRef
|
||||
namespacedRef:
|
||||
name: ${NAME}-customers-api
|
||||
name: customers-api_listcustomers
|
||||
methods:
|
||||
- GET
|
||||
- OPTIONS
|
||||
paths:
|
||||
- /customers/v1/customers/
|
||||
strip_path: false
|
||||
tags:
|
||||
- customers
|
||||
---
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongRoute
|
||||
metadata:
|
||||
name: ${NAME}-customers-api-createcustomer
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
serviceRef:
|
||||
type: namespacedRef
|
||||
namespacedRef:
|
||||
name: ${NAME}-customers-api
|
||||
name: customers-api_createcustomer
|
||||
methods:
|
||||
- POST
|
||||
- OPTIONS
|
||||
paths:
|
||||
- /customers/v1/customers/
|
||||
strip_path: false
|
||||
tags:
|
||||
- customers
|
||||
---
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongRoute
|
||||
metadata:
|
||||
name: ${NAME}-customers-api-getcustomer
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
serviceRef:
|
||||
type: namespacedRef
|
||||
namespacedRef:
|
||||
name: ${NAME}-customers-api
|
||||
name: customers-api_getcustomer
|
||||
methods:
|
||||
- GET
|
||||
- OPTIONS
|
||||
paths:
|
||||
- ~/customers/v1/customers/(?<customernumber>[^#?/]+)/$
|
||||
strip_path: false
|
||||
tags:
|
||||
- customers
|
||||
---
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongRoute
|
||||
metadata:
|
||||
name: ${NAME}-customers-api-updatecustomer
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
serviceRef:
|
||||
type: namespacedRef
|
||||
namespacedRef:
|
||||
name: ${NAME}-customers-api
|
||||
name: customers-api_updatecustomer
|
||||
methods:
|
||||
- PUT
|
||||
- OPTIONS
|
||||
paths:
|
||||
- ~/customers/v1/customers/(?<customernumber>[^#?/]+)/$
|
||||
strip_path: false
|
||||
tags:
|
||||
- customers
|
||||
---
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongRoute
|
||||
metadata:
|
||||
name: ${NAME}-customers-api-patchcustomer
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
serviceRef:
|
||||
type: namespacedRef
|
||||
namespacedRef:
|
||||
name: ${NAME}-customers-api
|
||||
name: customers-api_patchcustomer
|
||||
methods:
|
||||
- PATCH
|
||||
- OPTIONS
|
||||
paths:
|
||||
- ~/customers/v1/customers/(?<customernumber>[^#?/]+)/$
|
||||
strip_path: false
|
||||
tags:
|
||||
- customers
|
||||
---
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongRoute
|
||||
metadata:
|
||||
name: ${NAME}-customers-api-deletecustomer
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
serviceRef:
|
||||
type: namespacedRef
|
||||
namespacedRef:
|
||||
name: ${NAME}-customers-api
|
||||
name: customers-api_deletecustomer
|
||||
methods:
|
||||
- DELETE
|
||||
- OPTIONS
|
||||
paths:
|
||||
- ~/customers/v1/customers/(?<customernumber>[^#?/]+)/$
|
||||
strip_path: false
|
||||
tags:
|
||||
- customers
|
||||
---
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongRoute
|
||||
metadata:
|
||||
name: ${NAME}-customers-api-getcustomerorders
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
serviceRef:
|
||||
type: namespacedRef
|
||||
namespacedRef:
|
||||
name: ${NAME}-customers-api
|
||||
name: customers-api_getcustomerorders
|
||||
methods:
|
||||
- GET
|
||||
- OPTIONS
|
||||
paths:
|
||||
- ~/customers/v1/customers/(?<customernumber>[^#?/]+)/orders/$
|
||||
strip_path: false
|
||||
tags:
|
||||
- customers
|
||||
---
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongRoute
|
||||
metadata:
|
||||
name: ${NAME}-customers-api-getcustomerpayments
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
serviceRef:
|
||||
type: namespacedRef
|
||||
namespacedRef:
|
||||
name: ${NAME}-customers-api
|
||||
name: customers-api_getcustomerpayments
|
||||
methods:
|
||||
- GET
|
||||
- OPTIONS
|
||||
paths:
|
||||
- ~/customers/v1/customers/(?<customernumber>[^#?/]+)/payments/$
|
||||
strip_path: false
|
||||
tags:
|
||||
- customers
|
||||
Reference in New Issue
Block a user