github.com/sanposhiho/openapi2proto@v0.0.0-20230521044535-d1080a134e37/fixtures/semantic_api.json (about) 1 2 { 3 "swagger": "2.0", 4 "info": { 5 "title": "The Semantic API", 6 "description": "The Semantic API complements the Articles API. With the Semantic API, you get access to the long list of people, places, organizations and other locations, entities and descriptors that make up the controlled vocabulary used as metadata by The New York Times (sometimes referred to as Times Tags and used for Times Topics pages).\n\nThe Semantic API uses concepts which are, by definition, terms in The New York Times controlled vocabulary. Like the way facets are used in the Articles API, concepts are a good way to uncover articles of interest in The New York Times archive, and at the same time, limit the scope and number of those articles. The Semantic API maps to external semantic data resources, in a fashion consistent with the idea of linked data. The Semantic API also provides combination and relationship information to other, similar concepts in The New York Times controlled vocabulary.\n", 7 "version": "2.0.0" 8 }, 9 "host": "api.nytimes.com", 10 "schemes": [ 11 "http", 12 "https" 13 ], 14 "basePath": "\/svc\/semantic\/v2\/concept", 15 "produces": [ 16 "application\/json" 17 ], 18 "security": [ 19 { 20 "apikey": [ 21 22 ] 23 } 24 ], 25 "paths": { 26 "\/name\/{concept-type}\/{specific-concept}.json": { 27 "get": { 28 "parameters": [ 29 { 30 "$ref": "#/parameters/ConceptTypeParam" 31 }, 32 { 33 "$ref": "#/parameters/SpecificConceptParam" 34 }, 35 { 36 "name": "fields", 37 "in": "query", 38 "description": "\"all\" or comma-separated list of specific optional fields: pages, ticker_symbol, links, taxonomy, combinations, geocodes, article_list, scope_notes, search_api_query\n\nOptional fields are returned in result_set. They are briefly explained here:\n\npages: A list of topic pages associated with a specific concept.\nticker_symbol: If this concept is a publicly traded company, this field contains the ticker symbol.\nlinks: A list of links from this concept to external data resources.\ntaxonomy: For descriptor concepts, this field returns a list of taxonomic relations to other concepts.\ncombinations: For descriptor concepts, this field returns a list of the specific meanings tis concept takes on when combined with other concepts.\ngeocodes: For geographic concepts, the full GIS record from geonames.\narticle_list: A list of up to 10 articles associated with this concept.\nscope_notes: Scope notes contains clarifications and meaning definitions that explicate the relationship between the concept and an article.\nsearch_api_query: Returns the request one would need to submit to the Article Search API to obtain a list of articles annotated with this concept.\n", 39 "required": false, 40 "type": "string", 41 "enum": [ 42 "all", 43 "pages", 44 "ticker_symbol", 45 "links", 46 "taxonomy", 47 "combinations", 48 "geocodes", 49 "article_list", 50 "scope_notes", 51 "search_api_query" 52 ] 53 }, 54 { 55 "name": "query", 56 "in": "query", 57 "description": "Precedes the search term string. Used in a Search Query. Except for <specific_concept_name>, Search Query will take the required parameters listed above (<concept_type>, <concept_uri>, <article_uri>) as an optional_parameter in addition to the query=<query_term>.", 58 "required": true, 59 "type": "string" 60 } 61 ], 62 "responses": { 63 "200": { 64 "description": "An array of Concepts", 65 "schema": { 66 "type": "object", 67 "properties": { 68 "status": { 69 "type": "string" 70 }, 71 "copyright": { 72 "type": "string" 73 }, 74 "num_results": { 75 "type": "integer" 76 }, 77 "results": { 78 "type": "array", 79 "items": { 80 "$ref": "#\/definitions\/Concept" 81 } 82 } 83 } 84 } 85 } 86 } 87 } 88 }, 89 "\/something\/blah.json": { 90 "get": { 91 "parameters": [], 92 "responses": { 93 "200": { 94 "description":"this is an empty response" 95 } 96 } 97 } 98 }, 99 "\/concept\/search.json": { 100 "get": { 101 "parameters": [ 102 { 103 "name": "query", 104 "in": "query", 105 "description": "Precedes the search term string. Used in a Search Query. Except for <specific_concept_name>, Search Query will take the required parameters listed above (<concept_type>, <concept_uri>, <article_uri>) as an optional_parameter in addition to the query=<query_term>.", 106 "required": true, 107 "type": "string" 108 }, 109 { 110 "name": "offset", 111 "in": "query", 112 "description": "Integer value for the index count from the first concept to the last concept, sorted alphabetically. Used in a Search Query. A Search Query will return up to 10 concepts in its results.", 113 "default": 10, 114 "required": false, 115 "type": "integer" 116 }, 117 { 118 "name": "fields", 119 "in": "query", 120 "description": "\"all\" or comma-separated list of specific optional fields: pages, ticker_symbol, links, taxonomy, combinations, geocodes, article_list, scope_notes, search_api_query\n\nOptional fields are returned in result_set. They are briefly explained here:\n\npages: A list of topic pages associated with a specific concept.\nticker_symbol: If this concept is a publicly traded company, this field contains the ticker symbol.\nlinks: A list of links from this concept to external data resources.\ntaxonomy: For descriptor concepts, this field returns a list of taxonomic relations to other concepts.\ncombinations: For descriptor concepts, this field returns a list of the specific meanings tis concept takes on when combined with other concepts.\ngeocodes: For geographic concepts, the full GIS record from geonames.\narticle_list: A list of up to 10 articles associated with this concept.\nscope_notes: Scope notes contains clarifications and meaning definitions that explicate the relationship between the concept and an article.\nsearch_api_query: Returns the request one would need to submit to the Article Search API to obtain a list of articles annotated with this concept.\n", 121 "required": false, 122 "type": "string", 123 "enum": [ 124 "all", 125 "pages", 126 "ticker_symbol", 127 "links", 128 "taxonomy", 129 "combinations", 130 "geocodes", 131 "article_list", 132 "scope_notes", 133 "search_api_query" 134 ] 135 } 136 ], 137 "responses": { 138 "200": { 139 "description": "An array of Concepts", 140 "schema": { 141 "type": "object", 142 "properties": { 143 "status": { 144 "type": "string" 145 }, 146 "copyright": { 147 "type": "string" 148 }, 149 "num_results": { 150 "type": "integer" 151 }, 152 "results": { 153 "type": "array", 154 "items": { 155 "$ref": "#\/definitions\/ConceptRelation" 156 } 157 } 158 } 159 } 160 } 161 } 162 } 163 } 164 }, 165 "parameters": { 166 "ConceptTypeParam": { 167 "name": "concept-type", 168 "in": "path", 169 "description": "The type of the concept, used for Constructing a Semantic API Request by Concept Type and Specific Concept Name. The parameter is defined as a name-value pair, as in \"concept_type=[nytd_geo|nytd_per|nytd_org|nytd_des]\".\n", 170 "type": "string", 171 "enum": [ 172 "nytd_geo", 173 "nytd_per", 174 "nytd_org", 175 "nytd_des" 176 ], 177 "required": true 178 }, 179 "SpecificConceptParam": { 180 "name": "specific-concept", 181 "in": "path", 182 "description": "The name of the concept, used for Constructing a Semantic API Request by Concept Type and Specific Concept Name. The parameter is defined in the URI path, as the element immediately preceding \".json\" like with \"Baseball.json\".\n", 183 "required": true, 184 "type": "string" 185 } 186 }, 187 "definitions": { 188 "Concept": { 189 "type": "object", 190 "properties": { 191 "concept_id": { 192 "type": "integer" 193 }, 194 "concept_name": { 195 "type": "string" 196 }, 197 "is_times_tag": { 198 "type": "integer" 199 }, 200 "concept_status": { 201 "type": "string" 202 }, 203 "vernacular": { 204 "type": "string" 205 }, 206 "concept_type": { 207 "type": "string" 208 }, 209 "concept_created": { 210 "type": "string" 211 }, 212 "concept_updated": { 213 "type": "string" 214 }, 215 "taxonomy": { 216 "type": "array", 217 "items": { 218 "type": "object", 219 "properties": { 220 "source_concept_id": { 221 "type": "integer" 222 }, 223 "target_concept_id": { 224 "type": "integer" 225 }, 226 "source_concept_name": { 227 "type": "string" 228 }, 229 "target_concept_name": { 230 "type": "string" 231 }, 232 "source_concept_type": { 233 "type": "string" 234 }, 235 "target_concept_type": { 236 "type": "string" 237 }, 238 "source_concept_vernacular": { 239 "type": "string" 240 }, 241 "target_concept_vernacular": { 242 "type": "string" 243 }, 244 "taxonomic_relation": { 245 "type": "string" 246 }, 247 "taxonomic_verification_status": { 248 "type": "string" 249 } 250 } 251 } 252 }, 253 "links": { 254 "type": "array", 255 "items": { 256 "type": "object", 257 "properties": { 258 "concept_id": { 259 "type": "integer" 260 }, 261 "concept_name": { 262 "type": "string" 263 }, 264 "concept_status": { 265 "type": "string" 266 }, 267 "is_times_tag": { 268 "type": "integer" 269 }, 270 "concept_type": { 271 "type": "string" 272 }, 273 "link_id": { 274 "type": "integer" 275 }, 276 "relation": { 277 "type": "string" 278 }, 279 "link": { 280 "type": "string" 281 }, 282 "link_type": { 283 "type": "string" 284 }, 285 "mapping_type": { 286 "type": "string" 287 } 288 } 289 } 290 }, 291 "search_api_query": { 292 "type": "string" 293 }, 294 "article_list": { 295 "type": "object", 296 "properties": { 297 "results": { 298 "type": "array", 299 "items": { 300 "type": "object", 301 "properties": { 302 "body": { 303 "type": "string" 304 }, 305 "byline": { 306 "type": "string" 307 }, 308 "concepts": { 309 "type": "object", 310 "properties": { 311 "nytd_des": { 312 "type": "array", 313 "items": { 314 "type": "string" 315 } 316 }, 317 "nytd_org": { 318 "type": "array", 319 "items": { 320 "type": "string" 321 } 322 }, 323 "nytd_per": { 324 "type": "array", 325 "items": { 326 "type": "string" 327 } 328 } 329 } 330 }, 331 "date": { 332 "type": "string" 333 }, 334 "document_type": { 335 "type": "string" 336 }, 337 "title": { 338 "type": "string" 339 }, 340 "type_of_material": { 341 "type": "string" 342 }, 343 "url": { 344 "type": "string" 345 } 346 } 347 } 348 }, 349 "total": { 350 "type": "integer" 351 } 352 } 353 }, 354 "scope_notes": { 355 "type": "array", 356 "items": { 357 "type": "object", 358 "properties": { 359 "scope_note": { 360 "type": "string" 361 }, 362 "scope_note_name": { 363 "type": "string" 364 }, 365 "scope_note_type": { 366 "type": "string" 367 } 368 } 369 } 370 }, 371 "combinations": { 372 "type": "array", 373 "items": { 374 "type": "object", 375 "properties": { 376 "combination_source_concept_id": { 377 "type": "integer" 378 }, 379 "combination_source_concept_name": { 380 "type": "string" 381 }, 382 "combination_source_concept_type": { 383 "type": "string" 384 }, 385 "combination_target_concept_id": { 386 "type": "integer" 387 }, 388 "combination_target_concept_name": { 389 "type": "string" 390 }, 391 "combination_target_concept_type": { 392 "type": "string" 393 }, 394 "combination_note": { 395 "type": "string" 396 } 397 } 398 } 399 }, 400 "ancestors": { 401 "type": "array", 402 "items": { 403 "$ref": "#\/definitions\/ConceptRelation" 404 } 405 }, 406 "descendants": { 407 "type": "array", 408 "items": { 409 "$ref": "#\/definitions\/ConceptRelation" 410 } 411 } 412 } 413 }, 414 "ConceptRelation": { 415 "type": "object", 416 "properties": { 417 "concept_id": { 418 "type": "integer" 419 }, 420 "concept_name": { 421 "type": "string" 422 }, 423 "is_times_tag": { 424 "type": "integer" 425 }, 426 "concept_status": { 427 "type": "string" 428 }, 429 "vernacular": { 430 "type": "string" 431 }, 432 "concept_type": { 433 "type": "string" 434 }, 435 "concept_created": { 436 "type": "string" 437 }, 438 "concept_updated": { 439 "$ref": "#/definitions/TestStringRef" 440 }, 441 "class": { 442 "type": "string", 443 "enum": [ 444 "nytd_geo", 445 "nytd_per", 446 "nytd_org", 447 "nytd_des" 448 ] 449 } 450 } 451 }, 452 "TestStringRef": { 453 "type": "string", 454 "minLength": 3 455 }, 456 "TestModel": { 457 "type": "object", 458 "properties": { 459 "category": { 460 "type": "string", 461 "enum": [ 462 "nytd_geo", 463 "nytd_per", 464 "nytd_org", 465 "nytd_des" 466 ], 467 "x-proto-tag": 1 468 }, 469 "class": { 470 "type": "array", 471 "items": { 472 "type":"object", 473 "properties": { 474 "something": { 475 "type": "string" 476 } 477 } 478 }, 479 "x-proto-tag": 2 480 }, 481 "test_bool": { 482 "type": "boolean", 483 "x-proto-tag": 3 484 }, 485 "test_bool_value": { 486 "type": ["null", "boolean"], 487 "x-proto-tag": 4 488 }, 489 "test_num_value": { 490 "type": ["null", "number"], 491 "format": "double", 492 "x-proto-tag": 5 493 }, 494 "test_numer_value": { 495 "type": ["null", "number"], 496 "x-proto-tag": 6 497 }, 498 "test_float_value": { 499 "type": ["null", "float"], 500 "x-proto-tag": 7 501 }, 502 "test_string_value": { 503 "type": ["null", "string"], 504 "x-proto-tag": 8 505 }, 506 "test_bytes_value": { 507 "type": ["null", "bytes"], 508 "x-proto-tag": 9 509 }, 510 "test_any_value": { 511 "type": ["null", "string", "object"], 512 "x-proto-tag": 10 513 }, 514 "test_map_object": { 515 "type": "object", 516 "additionalProperties": { 517 "$ref": "#/definitions/TestModel" 518 }, 519 "x-proto-tag": 11 520 }, 521 "test_map_scalar": { 522 "type": "object", 523 "additionalProperties": { 524 "type": "string" 525 }, 526 "x-proto-tag": 12 527 } 528 } 529 } 530 }, 531 "securityDefinitions": { 532 "apikey": { 533 "type": "apiKey", 534 "name": "api-key", 535 "in": "query" 536 } 537 } 538 }