diff --git a/app-config.yaml b/app-config.yaml index f68f5a30a2..be0f405de5 100644 --- a/app-config.yaml +++ b/app-config.yaml @@ -94,7 +94,7 @@ techdocs: generators: techdocs: 'docker' # Alternatives - 'local' publisher: - type: 'local' # Alternatives - 'googleGcs' or 'awsS3' or 'azureBlobStorage'. Read documentation for using alternatives. + type: 'local' # Alternatives - 'googleGcs' or 'awsS3' or 'azureBlobStorage' or 'openStackSwift' Read documentation for using alternatives. sentry: organization: my-company diff --git a/packages/techdocs-common/src/stages/publish/openStackSwift.test.ts b/packages/techdocs-common/src/stages/publish/openStackSwift.test.ts index 30ec8a59b9..b831012acf 100644 --- a/packages/techdocs-common/src/stages/publish/openStackSwift.test.ts +++ b/packages/techdocs-common/src/stages/publish/openStackSwift.test.ts @@ -73,8 +73,10 @@ beforeEach(() => { publisher: { type: 'openStackSwift', openStackSwift: { - username: 'mockuser', - password: 'verystrongpass', + credentials: { + username: 'mockuser', + password: 'verystrongpass', + }, authUrl: 'mockauthurl', region: 'mockregion', containerName: 'mock', @@ -116,7 +118,7 @@ describe('OpenStackSwiftPublish', () => { entity, directory: entityRootDir, }), - ).toBeUndefined() + ).toBeUndefined(); }); it('should fail to publish a directory', async () => { diff --git a/packages/techdocs-common/src/stages/publish/publish.test.ts b/packages/techdocs-common/src/stages/publish/publish.test.ts index f9bd0f3934..948b92aaa6 100644 --- a/packages/techdocs-common/src/stages/publish/publish.test.ts +++ b/packages/techdocs-common/src/stages/publish/publish.test.ts @@ -170,8 +170,10 @@ describe('Publisher', () => { publisher: { type: 'openStackSwift', openStackSwift: { - username: 'mockuser', - password: 'verystrongpass', + credentials: { + username: 'mockuser', + password: 'verystrongpass', + }, authUrl: 'mockauthurl', region: 'mockregion', containerName: 'mock', diff --git a/plugins/techdocs/config.d.ts b/plugins/techdocs/config.d.ts index c4fe4a47db..5e12f7dbc7 100644 --- a/plugins/techdocs/config.d.ts +++ b/plugins/techdocs/config.d.ts @@ -89,56 +89,57 @@ export interface Config { type: 'openStackSwift'; /** - * Required when 'type' is set to awsS3 + * Required when 'type' is set to openStackSwift */ openStackSwift?: { /** - * (Optional) Credentials used to access a storage bucket. - * If not set, environment variables or aws config file will be used to authenticate. - * @see https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/loading-node-credentials-environment.html - * @see https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/loading-node-credentials-shared.html + * (Required) Credentials used to access a storage bucket. + * @see https://docs.openstack.org/api-ref/identity/v3/?expanded=password-authentication-with-unscoped-authorization-detail#password-authentication-with-unscoped-authorization * @visibility secret */ + credentials: { + /** + * (Required) Root user name + * @visibility backend + */ + username: string; + /** + * (Required) Root user password + * @visibility backend + */ + password: string; // required + }; /** * (Required) Cloud Storage Container Name * @visibility backend */ containerName: string; - /** - * (Required) Root user name - * @visibility backend - */ - username: string; - /** - * (Required) Root user password - * @visibility backend - */ - password: string; // required /** * (Required) Auth url sometimes OpenStack uses different port check your OpenStack apis. * @visibility backend */ authUrl: string; /** - * (Required) Auth version + * (Optional) Auth version + * If not set, 'v2.0' will be used. * @visibility backend */ keystoneAuthVersion: string; /** - * (Required) Domaind Id + * (Required) Domain Id * @visibility backend */ domainId: string; /** - * (Required) Domaind Name + * (Required) Domain Name * @visibility backend */ - domainName: 'Default'; + domainName: string; /** * (Required) Region * @visibility backend */ - region: 'earth'; + region: string; }; } | {