|
| 1 | +METADATA = { |
| 2 | + "$schema": "http://json-schema.org/draft-07/schema", |
| 3 | + "$id": "http://example.com/example.json", |
| 4 | + "type": "object", |
| 5 | + "title": "Sample schema for ServerlessLand metadata.json files", |
| 6 | + "description": "This JSON document describes a sub-repo for displaying on ServerlessLand.", |
| 7 | + "required": ["title", "description", "content_language","language","type","diagram", |
| 8 | + "framework","services","git_repo_url","pattern_source", |
| 9 | + "pattern_detail_tabs","authors"], |
| 10 | + "properties": { |
| 11 | + "title": { |
| 12 | + "$id": "#/properties/title", |
| 13 | + "type": "string", |
| 14 | + "title": "The sub-repo title", |
| 15 | + "examples": ["Python Starter Project"], |
| 16 | + "maxLength": 128, |
| 17 | + "minLength": 10 |
| 18 | + }, |
| 19 | + "description": { |
| 20 | + "$id": "#/properties/description", |
| 21 | + "type": "string", |
| 22 | + "title": "The sub-repo description", |
| 23 | + "examples": ["This project contains automated test sample code samples for serverless applications written in Python."], |
| 24 | + "maxLength": 1028, |
| 25 | + "minLength": 10 |
| 26 | + }, |
| 27 | + "content_language": { |
| 28 | + "$id": "#/properties/content_language", |
| 29 | + "type": "string", |
| 30 | + "title": "Repository Written Language", |
| 31 | + "examples": ["English","Spanish"], |
| 32 | + "maxLength": 60, |
| 33 | + "minLength": 3 |
| 34 | + }, |
| 35 | + "language": { |
| 36 | + "$id": "#/properties/language", |
| 37 | + "type": "string", |
| 38 | + "title": "Repository Programming Language", |
| 39 | + "examples": [".NET","Python"], |
| 40 | + "pattern": ".NET|Java|Python|Typescript|GO|Rust", |
| 41 | + "maxLength": 60, |
| 42 | + "minLength": 3 |
| 43 | + }, |
| 44 | + "type": { |
| 45 | + "$id": "#/properties/type", |
| 46 | + "type": "array", |
| 47 | + "title": "Test Types Implemented", |
| 48 | + "examples": [["Unit"],["Unit","Integration"]], |
| 49 | + "minItems": 1, |
| 50 | + "uniqueItems": True, |
| 51 | + "items": { |
| 52 | + "type": "string", |
| 53 | + "pattern": "Unit|Integration|Load|Canary", |
| 54 | + } |
| 55 | + }, |
| 56 | + "diagram": { |
| 57 | + "$id": "#/properties/diagram", |
| 58 | + "type": "string", |
| 59 | + "title": "Achitecture or Test Diagram for the pattern", |
| 60 | + "examples": ["/img/xray.png"], |
| 61 | + "maxLength": 2048, |
| 62 | + "minLength": 3 |
| 63 | + }, |
| 64 | + "framework": { |
| 65 | + "$id": "#/properties/framework", |
| 66 | + "type": "string", |
| 67 | + "title": "Deployment Framework for the pattern", |
| 68 | + "examples": ["SAM"], |
| 69 | + "pattern": "SAM|Cloudformation|CDK", |
| 70 | + "maxLength": 60, |
| 71 | + "minLength": 3 |
| 72 | + }, |
| 73 | + "services": { |
| 74 | + "$id": "#/properties/services", |
| 75 | + "type": "array", |
| 76 | + "title": "AWS Services used in the pattern", |
| 77 | + "examples": [["apigw","lambda","dynamodb"]], |
| 78 | + "minItems": 1, |
| 79 | + "uniqueItems": True, |
| 80 | + "items": { |
| 81 | + "type": "string", |
| 82 | + "minLength": 2 |
| 83 | + } |
| 84 | + }, |
| 85 | + "git_repo_url": { |
| 86 | + "$id": "#/properties/git_repo_url", |
| 87 | + "type": "string", |
| 88 | + "title": "URL of the git repo", |
| 89 | + "examples": ["https://github.com/aws-samples/serverless-test-samples"], |
| 90 | + "pattern": "https://github.com/aws-samples/serverless-test-samples|https://github.com/aws-samples/*", |
| 91 | + "maxLength": 2048, |
| 92 | + "minLength": 3 |
| 93 | + }, |
| 94 | + "pattern_source": { |
| 95 | + "$id": "#/properties/pattern_source", |
| 96 | + "type": "string", |
| 97 | + "title": "Contributor of the the pattern", |
| 98 | + "examples": ["AWS"], |
| 99 | + "pattern": "AWS|Customer", |
| 100 | + "maxLength": 60, |
| 101 | + "minLength": 3 |
| 102 | + }, |
| 103 | + "pattern_detail_tabs": { |
| 104 | + "$id": "#/properties/pattern_detail_tabs", |
| 105 | + "type": "array", |
| 106 | + "title": "Detail links to key files, from sub-repo root", |
| 107 | + "minItems": 1, |
| 108 | + "uniqueItems": True, |
| 109 | + "items": { |
| 110 | + "type": "object", |
| 111 | + "required": ["title","filepath"], |
| 112 | + "properties": { |
| 113 | + "title": { |
| 114 | + "$id": "#/properties/pattern_detail_tabs/properties/title", |
| 115 | + "type": "string", |
| 116 | + "title": "Title of the key file", |
| 117 | + "examples": ["Application Code","Unit Tests - Emulator"], |
| 118 | + "maxLength": 128, |
| 119 | + "minLength": 3 |
| 120 | + }, |
| 121 | + "filepath": { |
| 122 | + "$id": "#/properties/pattern_detail_tabs/properties/filepath", |
| 123 | + "type": "string", |
| 124 | + "title": "File path of the key file from sub-project root", |
| 125 | + "examples": ["/src/app.py","/tests/unit/local_emulator_test.py"], |
| 126 | + "maxLength": 128, |
| 127 | + "minLength": 3 |
| 128 | + } |
| 129 | + } |
| 130 | + } |
| 131 | + }, |
| 132 | + "authors": { |
| 133 | + "$id": "#/properties/authors", |
| 134 | + "type": "array", |
| 135 | + "title": "About the authors", |
| 136 | + "minItems": 1, |
| 137 | + "uniqueItems": True, |
| 138 | + "items": { |
| 139 | + "type": "object", |
| 140 | + "required": ["name","bio"], |
| 141 | + "properties": { |
| 142 | + "name": { |
| 143 | + "$id": "#/properties/authors/properties/name", |
| 144 | + "type": "string", |
| 145 | + "title": "Author Name", |
| 146 | + "examples": ["Sara Tester","Joe Programmer"], |
| 147 | + "maxLength": 2048, |
| 148 | + "minLength": 3 |
| 149 | + }, |
| 150 | + "image": { |
| 151 | + "$id": "#/properties/authors/properties/image", |
| 152 | + "type": "string", |
| 153 | + "title": "URL to a hosted image of the author", |
| 154 | + "examples": ["https://www.linkedin.com/in/exampleperson/mypicture.png"], |
| 155 | + "maxLength": 4096, |
| 156 | + "minLength": 3, |
| 157 | + "pattern": "https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\+.~#?&\/=]*)" |
| 158 | + } |
| 159 | + , |
| 160 | + "bio": { |
| 161 | + "$id": "#/properties/authors/properties/bio", |
| 162 | + "type": "string", |
| 163 | + "title": "More about the author", |
| 164 | + "examples": ["Principal Solutions Architect at AWS"], |
| 165 | + "maxLength": 2048, |
| 166 | + "minLength": 3 |
| 167 | + } |
| 168 | + , |
| 169 | + "linkedin": { |
| 170 | + "$id": "#/properties/authors/properties/linkedin", |
| 171 | + "type": "string", |
| 172 | + "title": "URL to LinkedIn Account", |
| 173 | + "examples": [ "https://www.linkedin.com/in/exampleperson/"], |
| 174 | + "maxLength": 4096, |
| 175 | + "minLength": 3, |
| 176 | + "pattern": "https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\+.~#?&\/=]*)" |
| 177 | + } |
| 178 | + , |
| 179 | + "twitter": { |
| 180 | + "$id": "#/properties/authors/properties/twitter", |
| 181 | + "type": "string", |
| 182 | + "title": "Twitter handle for author", |
| 183 | + "examples": ["https://twitter.com/exampleperson"], |
| 184 | + "maxLength": 4096, |
| 185 | + "minLength": 3, |
| 186 | + "pattern": "https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\+.~#?&\/=]*)" |
| 187 | + } |
| 188 | + } |
| 189 | + } |
| 190 | + }, |
| 191 | + |
| 192 | + }, |
| 193 | +} |
0 commit comments