Skip to content

Commit 550857c

Browse files
authored
Fix generate open api that occurs null value in generated file (#215)
* Fix generate open api that occurs null value in generated file See #209 * Fix cypress tests Interceptor need to have new resourcePath that are now fixed to be not null.
1 parent cd5d1c7 commit 550857c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

core/apps/ame-e2e/src/support/commands.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,13 +535,13 @@ Cypress.Commands.add('saveAspectModelToWorkspace', () => {
535535
Cypress.Commands.add('openGenerationOpenApiSpec', () => {
536536
cy.intercept(
537537
'POST',
538-
'http://localhost:9091/ame/api/generate/open-api-spec?language=en&output=json&baseUrl=https://example.com&includeQueryApi=false&useSemanticVersion=false&pagingOption=NO_PAGING&resourcePath=null&ymlProperties=&jsonProperties=',
538+
'http://localhost:9091/ame/api/generate/open-api-spec?language=en&output=json&baseUrl=https://example.com&includeQueryApi=false&useSemanticVersion=false&pagingOption=NO_PAGING&resourcePath=&ymlProperties=&jsonProperties=',
539539
{fixture: 'valid-open-api.json'},
540540
);
541541

542542
cy.intercept(
543543
'POST',
544-
'http://localhost:9091/ame/api/generate/open-api-spec?language=en&output=yaml&baseUrl=https://example.com&includeQueryApi=false&useSemanticVersion=false&pagingOption=NO_PAGING&resourcePath=null&ymlProperties=&jsonProperties=',
544+
'http://localhost:9091/ame/api/generate/open-api-spec?language=en&output=yaml&baseUrl=https://example.com&includeQueryApi=false&useSemanticVersion=false&pagingOption=NO_PAGING&resourcePath=&ymlProperties=&jsonProperties=',
545545
{fixture: 'valid-open-api.yaml'},
546546
);
547547

core/libs/editor/src/lib/editor-toolbar/components/generate-open-api/generate-open-api.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export class GenerateOpenApiComponent implements OnInit, OnDestroy {
111111
activateResourcePath: new FormControl(false),
112112
output: new FormControl('yaml'),
113113
paging: new FormControl('NO_PAGING'),
114-
resourcePath: new FormControl(null),
114+
resourcePath: new FormControl(''),
115115
file: new FormControl(null),
116116
ymlProperties: new FormControl(null),
117117
jsonProperties: new FormControl(null),
@@ -129,7 +129,7 @@ export class GenerateOpenApiComponent implements OnInit, OnDestroy {
129129
resourcePathControl?.setValue('/resource/{resourceId}');
130130
resourcePathControl?.setValidators(this.resourcePathValidators);
131131
} else {
132-
resourcePathControl?.setValue(null);
132+
resourcePathControl?.setValue('');
133133
resourcePathControl?.setValidators(null);
134134
}
135135

0 commit comments

Comments
 (0)