Closed ronaldtse closed 6 months ago
Like this:
schema_paths = YAML.load_file('documents/iso-10303-41/schemas.yaml')['schemas'].map {|x,y| y['path'].gsub("../../", "")} repo = Expressir::Express::Parser.from_files(schema_paths); 1 filtered_schemas = ["action_schema", "date_time_schema"] select_proc = Proc.new do |value| if value.is_a?(Expressir::Model::Declarations::Schema) filtered_schemas.include?(value.id) else true end end y = repo.to_hash(select_proc: select_proc) schemas = y['schemas'] schemas.map {|s| s["id"] }
Like this: