Browse Source

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

Ramesh Mane 6 days ago
parent
commit
d83d718c41
  1. 5
      packages/nocodb/src/controllers/views.controller.ts
  2. 50
      packages/nocodb/src/schema/swagger-v2.json
  3. 50
      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( async shareViewUpdate(
@TenantContext() context: NcContext, @TenantContext() context: NcContext,
@Param('viewId') viewId: string, @Param('viewId') viewId: string,
@Body() body: ViewUpdateReqType, @Body() body: ViewUpdateReqType & {
custom_url_path?: string;
original_url?: string;
},
@Req() req: NcRequest, @Req() req: NcRequest,
) { ) {
return await this.viewsService.shareViewUpdate(context, { return await this.viewsService.shareViewUpdate(context, {

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

@ -2794,8 +2794,25 @@
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"allOf":[
{
"$ref": "#/components/schemas/SharedBaseReq" "$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": { "examples": {
"Example 1": { "Example 1": {
"value": { "value": {
@ -5301,7 +5318,24 @@
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"allOf":[
{
"$ref": "#/components/schemas/SharedViewReq" "$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", "type": "string",
"description": "The role given the target user", "description": "The role given the target user",
"example": "editor" "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": { "x-stoplight": {
@ -19867,14 +19893,6 @@
"password": { "password": {
"$ref": "#/components/schemas/StringOrNull", "$ref": "#/components/schemas/StringOrNull",
"description": "Password to restrict access" "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": { "x-stoplight": {

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

@ -3259,8 +3259,25 @@
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"allOf":[
{
"$ref": "#/components/schemas/SharedBaseReq" "$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": { "examples": {
"Example 1": { "Example 1": {
"value": { "value": {
@ -5908,7 +5925,24 @@
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"allOf":[
{
"$ref": "#/components/schemas/SharedViewReq" "$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", "type": "string",
"description": "The role given the target user", "description": "The role given the target user",
"example": "editor" "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": { "x-stoplight": {
@ -24983,14 +25009,6 @@
"password": { "password": {
"$ref": "#/components/schemas/StringOrNull", "$ref": "#/components/schemas/StringOrNull",
"description": "Password to restrict access" "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": { "x-stoplight": {

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

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

Loading…
Cancel
Save