Browse Source

fix(nc-gui): update custom url update swagger file

Ramesh Mane 4 days ago
parent
commit
d83d718c41
  1. 5
      packages/nocodb/src/controllers/views.controller.ts
  2. 54
      packages/nocodb/src/schema/swagger-v2.json
  3. 54
      packages/nocodb/src/schema/swagger.json
  4. 5
      packages/nocodb/src/services/views.service.ts

5
packages/nocodb/src/controllers/views.controller.ts

@ -150,7 +150,10 @@ export class ViewsController {
async shareViewUpdate(
@TenantContext() context: NcContext,
@Param('viewId') viewId: string,
@Body() body: ViewUpdateReqType,
@Body() body: ViewUpdateReqType & {
custom_url_path?: string;
original_url?: string;
},
@Req() req: NcRequest,
) {
return await this.viewsService.shareViewUpdate(context, {

54
packages/nocodb/src/schema/swagger-v2.json

@ -2794,7 +2794,24 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SharedBaseReq"
"allOf":[
{
"$ref": "#/components/schemas/SharedBaseReq"
},
{
"type": "object",
"properties": {
"original_url": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Original url to redirect from custom url path"
},
"custom_url_path": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Custom url path"
}
}
}
]
},
"examples": {
"Example 1": {
@ -5301,7 +5318,24 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SharedViewReq"
"allOf":[
{
"$ref": "#/components/schemas/SharedViewReq"
},
{
"type": "object",
"properties": {
"original_url": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Original url to redirect from custom url path"
},
"custom_url_path": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Custom url path"
}
}
}
]
}
}
},
@ -19699,14 +19733,6 @@
"type": "string",
"description": "The role given the target user",
"example": "editor"
},
"original_url": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Original url user to redirect from custom url path"
},
"custom_url_path": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Custom url path"
}
},
"x-stoplight": {
@ -19867,14 +19893,6 @@
"password": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Password to restrict access"
},
"original_url": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Original url user to redirect from custom url path"
},
"custom_url_path": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Custom url path"
}
},
"x-stoplight": {

54
packages/nocodb/src/schema/swagger.json

@ -3259,7 +3259,24 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SharedBaseReq"
"allOf":[
{
"$ref": "#/components/schemas/SharedBaseReq"
},
{
"type": "object",
"properties": {
"original_url": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Original url to redirect from custom url path"
},
"custom_url_path": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Custom url path"
}
}
}
]
},
"examples": {
"Example 1": {
@ -5908,7 +5925,24 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SharedViewReq"
"allOf":[
{
"$ref": "#/components/schemas/SharedViewReq"
},
{
"type": "object",
"properties": {
"original_url": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Original url to redirect from custom url path"
},
"custom_url_path": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Custom url path"
}
}
}
]
}
}
},
@ -24818,14 +24852,6 @@
"type": "string",
"description": "The role given the target user",
"example": "editor"
},
"original_url": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Original url user to redirect from custom url path"
},
"custom_url_path": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Custom url path"
}
},
"x-stoplight": {
@ -24983,14 +25009,6 @@
"password": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Password to restrict access"
},
"original_url": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Original url user to redirect from custom url path"
},
"custom_url_path": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Custom url path"
}
},
"x-stoplight": {

5
packages/nocodb/src/services/views.service.ts

@ -262,7 +262,10 @@ export class ViewsService {
context: NcContext,
param: {
viewId: string;
sharedView: SharedViewReqType;
sharedView: SharedViewReqType & {
custom_url_path?: string;
original_url?: string
};
user: UserType;
req: NcRequest;
},

Loading…
Cancel
Save