events-backend: update even bus route paths
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -132,7 +132,7 @@ export const spec = {
|
||||
},
|
||||
},
|
||||
paths: {
|
||||
'/hub/events': {
|
||||
'/bus/v1/events': {
|
||||
post: {
|
||||
operationId: 'PostEvent',
|
||||
description: 'Publish a new event',
|
||||
@@ -192,7 +192,7 @@ export const spec = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'/hub/subscriptions/{subscriptionId}': {
|
||||
'/bus/v1/subscriptions/{subscriptionId}': {
|
||||
put: {
|
||||
operationId: 'PutSubscription',
|
||||
description:
|
||||
@@ -245,7 +245,7 @@ export const spec = {
|
||||
},
|
||||
},
|
||||
},
|
||||
'/hub/subscriptions/{subscriptionId}/events': {
|
||||
'/bus/v1/subscriptions/{subscriptionId}/events': {
|
||||
get: {
|
||||
operationId: 'GetSubscriptionEvents',
|
||||
description: 'Get new events for the provided subscription',
|
||||
|
||||
@@ -88,7 +88,7 @@ components:
|
||||
scheme: bearer
|
||||
bearerFormat: JWT
|
||||
paths:
|
||||
/hub/events:
|
||||
/bus/v1/events:
|
||||
post:
|
||||
operationId: PostEvent
|
||||
description: Publish a new event
|
||||
@@ -126,7 +126,7 @@ paths:
|
||||
payload:
|
||||
myData: foo
|
||||
|
||||
/hub/subscriptions/{subscriptionId}:
|
||||
/bus/v1/subscriptions/{subscriptionId}:
|
||||
put:
|
||||
operationId: PutSubscription
|
||||
description: Ensures that the subscription exists with the provided configuration
|
||||
@@ -160,7 +160,7 @@ paths:
|
||||
topics:
|
||||
- test-topic
|
||||
|
||||
/hub/subscriptions/{subscriptionId}/events:
|
||||
/bus/v1/subscriptions/{subscriptionId}/events:
|
||||
get:
|
||||
operationId: GetSubscriptionEvents
|
||||
description: Get new events for the provided subscription
|
||||
|
||||
@@ -53,7 +53,7 @@ export async function createEventBusRouter(options: {
|
||||
|
||||
router.use(apiRouter);
|
||||
|
||||
apiRouter.post('/hub/events', async (req, res) => {
|
||||
apiRouter.post('/bus/v1/events', async (req, res) => {
|
||||
const credentials = await httpAuth.credentials(req, {
|
||||
allow: ['service'],
|
||||
});
|
||||
@@ -85,7 +85,7 @@ export async function createEventBusRouter(options: {
|
||||
});
|
||||
|
||||
apiRouter.get(
|
||||
'/hub/subscriptions/:subscriptionId/events',
|
||||
'/bus/v1/subscriptions/:subscriptionId/events',
|
||||
async (req, res) => {
|
||||
const credentials = await httpAuth.credentials(req, {
|
||||
allow: ['service'],
|
||||
@@ -135,7 +135,7 @@ export async function createEventBusRouter(options: {
|
||||
},
|
||||
);
|
||||
|
||||
apiRouter.put('/hub/subscriptions/:subscriptionId', async (req, res) => {
|
||||
apiRouter.put('/bus/v1/subscriptions/:subscriptionId', async (req, res) => {
|
||||
const credentials = await httpAuth.credentials(req, {
|
||||
allow: ['service'],
|
||||
});
|
||||
|
||||
@@ -75,7 +75,7 @@ export class DefaultApiClient {
|
||||
): Promise<TypedResponse<void | GetSubscriptionEvents200Response>> {
|
||||
const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);
|
||||
|
||||
const uriTemplate = `/hub/subscriptions/{subscriptionId}/events`;
|
||||
const uriTemplate = `/bus/v1/subscriptions/{subscriptionId}/events`;
|
||||
|
||||
const uri = parser.parse(uriTemplate).expand({
|
||||
subscriptionId: request.path.subscriptionId,
|
||||
@@ -103,7 +103,7 @@ export class DefaultApiClient {
|
||||
): Promise<TypedResponse<void>> {
|
||||
const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);
|
||||
|
||||
const uriTemplate = `/hub/events`;
|
||||
const uriTemplate = `/bus/v1/events`;
|
||||
|
||||
const uri = parser.parse(uriTemplate).expand({});
|
||||
|
||||
@@ -134,7 +134,7 @@ export class DefaultApiClient {
|
||||
): Promise<TypedResponse<void>> {
|
||||
const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);
|
||||
|
||||
const uriTemplate = `/hub/subscriptions/{subscriptionId}`;
|
||||
const uriTemplate = `/bus/v1/subscriptions/{subscriptionId}`;
|
||||
|
||||
const uri = parser.parse(uriTemplate).expand({
|
||||
subscriptionId: request.path.subscriptionId,
|
||||
|
||||
Reference in New Issue
Block a user