Skip to content

Commit

Permalink
SHIBUI-704 Implemented url request construction schema
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Nov 16, 2018
1 parent fa55443 commit 8a0c2e8
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
{
"type": "object",
"order": [
"xmlId",
"metadataURL"
],
"required": [
"xmlId",
"metadataURL"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
[schema]="schema$ | async"
[model]="model$ | async"
[validators]="validators$ | async"
[bindings]="bindings$ | async"
(onChange)="valueChangeSubject.next($event)"
(onErrorChange)="statusChangeSubject.next($event)"></sf-form>
</ng-container>
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export class ProviderEditStepComponent implements OnDestroy {
definition$: Observable<Wizard<MetadataProvider>>;
changes$: Observable<MetadataProvider>;
step$: Observable<WizardStep>;
bindings$: Observable<any>;

validators$: Observable<{ [key: string]: any }>;

Expand All @@ -50,6 +51,7 @@ export class ProviderEditStepComponent implements OnDestroy {
this.provider$ = this.store.select(fromProvider.getSelectedProvider);
this.step$ = this.store.select(fromWizard.getCurrent);
this.schema$ = this.store.select(fromWizard.getSchema);
this.bindings$ = this.definition$.pipe(map(d => d.bindings));

this.step$.subscribe(s => {
if (s && s.locked) {
Expand Down
10 changes: 5 additions & 5 deletions ui/src/app/metadata/provider/model/dynamic-http.provider.form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,13 @@ export const DynamicHttpMetadataProviderEditor: Wizard<DynamicHttpMetadataProvid
initialValues: [],
schema: '/api/ui/MetadataResolver/DynamicHttpMetadataResolver',
fields: [
'enabled',
'xmlId',
'metadataURL',
'metadataRequestURLConstructionScheme',
'enabled',
'requireValidMetadata',
'failFastInitialization',
'metadataRequestURLConstructionScheme'
]
'failFastInitialization'
],
order: ['xmlId', 'metadataRequestURLConstructionScheme', 'enabled', 'requireValidMetadata', 'failFastInitialization']
},
{
id: 'dynamic',
Expand Down
1 change: 1 addition & 0 deletions ui/src/app/wizard/model/wizard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export interface WizardStep {
fieldsets?: WizardFieldset[];
summary?: boolean;
override?: any;
order?: string[];
}

export interface WizardFieldset {
Expand Down
5 changes: 5 additions & 0 deletions ui/src/app/wizard/reducer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as fromWizard from './wizard.reducer';
import { createFeatureSelector, createSelector } from '@ngrx/store';
import { Wizard, WizardStep } from '../model';
import { diff } from 'deep-object-diff';
import { SchemaService } from '../../schema-form/service/schema.service';

export interface WizardState {
wizard: fromWizard.State;
Expand Down Expand Up @@ -75,6 +76,10 @@ export const getSplitSchema = (schema: any, step: WizardStep) => {
});
}

if (step.order) {
s.order = step.order;
}

if (schema.definitions) {
s.definitions = schema.definitions;
}
Expand Down

0 comments on commit 8a0c2e8

Please sign in to comment.