File tree Expand file tree Collapse file tree 4 files changed +36
-2
lines changed
Expand file tree Collapse file tree 4 files changed +36
-2
lines changed Original file line number Diff line number Diff line change 11---
22dependencies :
33 - role : bobbins
4+
5+ argument_specs :
6+ main :
7+ short_description : " The main entry point"
8+ options :
9+ example_var :
10+ type : str
Original file line number Diff line number Diff line change 1+ ---
2+ galaxy_info :
3+ author : " ansible-lint"
4+ description : " test"
5+ license : " MIT"
6+ min_ansible_version : " 2.10"
7+
8+ argument_specs :
9+ main :
10+ options :
11+ my_var :
12+ type : not_a_real_type
Original file line number Diff line number Diff line change 15701570 },
15711571 "galaxy_info" : {
15721572 "$ref" : " #/$defs/GalaxyInfoModel"
1573+ },
1574+ "argument_specs" : {
1575+ "title" : " Role Argument Specifications" ,
1576+ "type" : " object" ,
1577+ "additionalProperties" : {
1578+ "$ref" : " role-arg-spec.json#/$defs/entry_point"
1579+ }
15731580 }
15741581 },
15751582 "title" : " Ansible Meta Schema v1/v2" ,
Original file line number Diff line number Diff line change @@ -46,6 +46,11 @@ const schema_files = fs
4646 . filter ( ( el ) => path . extname ( el ) === ".json" ) ;
4747console . log ( `Schemas: ${ schema_files } ` ) ;
4848
49+ schema_files . forEach ( ( schema_file ) => {
50+ const schema_json = JSON . parse ( fs . readFileSync ( `f/${ schema_file } ` , "utf8" ) ) ;
51+ ajv . addSchema ( schema_json , schema_file ) ;
52+ } ) ;
53+
4954describe ( "schemas under f/" , ( ) => {
5055 schema_files . forEach ( ( schema_file ) => {
5156 if (
@@ -54,8 +59,11 @@ describe("schemas under f/", () => {
5459 ) {
5560 return ;
5661 }
57- const schema_json = JSON . parse ( fs . readFileSync ( `f/${ schema_file } ` , "utf8" ) ) ;
58- ajv . addSchema ( schema_json ) ;
62+ const schema_instance = ajv . getSchema ( schema_file ) ;
63+ if ( ! schema_instance ) return ;
64+
65+ // biome-ignore lint/suspicious/noExplicitAny: internal test suite needs to access dynamic schema properties
66+ const schema_json = schema_instance . schema as any ;
5967 const validator = ajv . compile ( schema_json ) ;
6068 if (
6169 schema_json . examples === undefined &&
You can’t perform that action at this time.
0 commit comments