File tree Expand file tree Collapse file tree
common/changes/@kickstartds/jsonschema-utils
tools/jsonschema-utils/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {
2+ "changes" : [
3+ {
4+ "packageName" : " @kickstartds/jsonschema-utils" ,
5+ "comment" : " move hiding of cms fields in processing" ,
6+ "type" : " patch"
7+ }
8+ ],
9+ "packageName" : " @kickstartds/jsonschema-utils"
10+ }
Original file line number Diff line number Diff line change @@ -702,7 +702,6 @@ export async function processSchemas(
702702 if ( shouldInlineReferences ) inlineReferences ( sortedSchemas , typeResolution ) ;
703703 if ( additionalProperties && additionalProperties !== 'keep' )
704704 processAdditionalProperties ( sortedSchemas , additionalProperties ) ;
705- if ( shouldHideCmsFields ) hideCmsFields ( sortedSchemas ) ;
706705
707706 // 2. add all schemas to ajv for the following processing steps
708707 sortedSchemas . forEach ( ( schema ) => {
@@ -722,12 +721,13 @@ export async function processSchemas(
722721 } ) ;
723722
724723 // 4. process new schemas, resulting from adding the distinct
725- // `anyOf`s in the step before
724+ // `anyOf`s in the step before, hide CMS fields marked as hidden
726725 if ( typeResolution ) addTypeInterfaces ( schemaAnyOfs ) ;
727726 if ( shouldAddExlicitAnyOfs && shouldMergeAllOf )
728727 schemaAnyOfs . forEach ( ( schemaAnyOf ) => {
729728 reduceSchemaAllOfs ( schemaAnyOf , ajv , shouldReplaceExamples ) ;
730729 } ) ;
730+ if ( shouldHideCmsFields ) hideCmsFields ( sortedSchemas ) ;
731731
732732 // 5. return list of processed schema `$id`s.
733733 // Accessing the full schemas works through `ajv`
You can’t perform that action at this time.
0 commit comments