|
| 1 | +{ |
| 2 | + "$schema": "http://json-schema.org/draft-07/schema#", |
| 3 | + "$id": "github.com/jf-tech/omniparser:fixedlength2_file_declaration", |
| 4 | + "title": "omniparser schema: fixedlength2/file_declaration", |
| 5 | + "type": "object", |
| 6 | + "properties": { |
| 7 | + "file_declaration": { |
| 8 | + "type": "object", |
| 9 | + "properties": { |
| 10 | + "envelopes": { |
| 11 | + "type": "array", |
| 12 | + "items": { |
| 13 | + "oneOf": [ |
| 14 | + { "$ref": "#/definitions/envelope_rows_based" }, |
| 15 | + { "$ref": "#/definitions/envelope_header_footer_based" } |
| 16 | + ] |
| 17 | + } |
| 18 | + } |
| 19 | + }, |
| 20 | + "required": [ "envelopes" ], |
| 21 | + "additionalProperties": false |
| 22 | + } |
| 23 | + }, |
| 24 | + "required": [ "file_declaration" ], |
| 25 | + "definitions": { |
| 26 | + "envelope_rows_based": { |
| 27 | + "type": "object", |
| 28 | + "properties": { |
| 29 | + "name": { "type": "string", "minLength": 1 }, |
| 30 | + "rows": { "type": "integer", "minimum": 1 }, |
| 31 | + "type": { "type": "string", "enum": [ "envelope", "envelope_group" ] }, |
| 32 | + "is_target": { "type": "boolean" }, |
| 33 | + "min": { "type": "integer", "minimum": 0 }, |
| 34 | + "max": { "type": "integer", "minimum": -1 }, |
| 35 | + "columns": { |
| 36 | + "type": "array", |
| 37 | + "items": { |
| 38 | + "$ref": "#/definitions/column_type" |
| 39 | + } |
| 40 | + }, |
| 41 | + "child_envelopes": { |
| 42 | + "type": "array", |
| 43 | + "items": { |
| 44 | + "oneOf": [ |
| 45 | + { "$ref": "#/definitions/envelope_rows_based" }, |
| 46 | + { "$ref": "#/definitions/envelope_header_footer_based" } |
| 47 | + ] |
| 48 | + } |
| 49 | + } |
| 50 | + }, |
| 51 | + "required": [], |
| 52 | + "additionalProperties": false |
| 53 | + }, |
| 54 | + "envelope_header_footer_based": { |
| 55 | + "type": "object", |
| 56 | + "properties": { |
| 57 | + "name": { "type": "string", "minLength": 1 }, |
| 58 | + "header": { "type": "string", "minLength": 1 }, |
| 59 | + "footer": { "type": "string", "minLength": 1 }, |
| 60 | + "type": { "type": "string", "enum": [ "envelope", "envelope_group" ] }, |
| 61 | + "is_target": { "type": "boolean" }, |
| 62 | + "min": { "type": "integer", "minimum": 0 }, |
| 63 | + "max": { "type": "integer", "minimum": -1 }, |
| 64 | + "columns": { |
| 65 | + "type": "array", |
| 66 | + "items": { |
| 67 | + "$ref": "#/definitions/column_type" |
| 68 | + } |
| 69 | + }, |
| 70 | + "child_envelopes": { |
| 71 | + "type": "array", |
| 72 | + "items": { |
| 73 | + "oneOf": [ |
| 74 | + { "$ref": "#/definitions/envelope_rows_based" }, |
| 75 | + { "$ref": "#/definitions/envelope_header_footer_based" } |
| 76 | + ] |
| 77 | + } |
| 78 | + } |
| 79 | + }, |
| 80 | + "required": [ "header" ], |
| 81 | + "additionalProperties": false |
| 82 | + }, |
| 83 | + "column_type": { |
| 84 | + "type": "object", |
| 85 | + "properties": { |
| 86 | + "name": { "type": "string", "minLength": 1 }, |
| 87 | + "start_pos": { "type": "integer", "minimum": 1 }, |
| 88 | + "length": { "type": "integer", "minimum": 1 }, |
| 89 | + "line_pattern": { "type": "string", "minLength": 1 } |
| 90 | + }, |
| 91 | + "required": [ "name", "start_pos", "length" ], |
| 92 | + "additionalProperties": false |
| 93 | + } |
| 94 | + } |
| 95 | +} |
0 commit comments