this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: update OpenAPI spec with source metadata fields

Add source_type, source_network, source_channel, source_user_id,
and source_user_name to request/response schemas. Add source
filter query parameters to GET endpoints. Update duplicate
detection description for per-source scoping.

+165 -2
+165 -2
internal/assets/openapi.json
··· 107 107 "type": "string" 108 108 }, 109 109 "description": "Tags associated with this link" 110 + }, 111 + "source_type": { 112 + "type": "string", 113 + "description": "Source platform (e.g., irc, slack, discord, api, web)", 114 + "example": "slack" 115 + }, 116 + "source_network": { 117 + "type": "string", 118 + "description": "Source network identifier (e.g., IRC server, Slack team ID)", 119 + "example": "T12345" 120 + }, 121 + "source_channel": { 122 + "type": "string", 123 + "description": "Source channel identifier (e.g., IRC channel, Slack channel ID)", 124 + "example": "C67890" 125 + }, 126 + "source_user_id": { 127 + "type": "string", 128 + "description": "Platform-specific user ID", 129 + "example": "U99999" 130 + }, 131 + "source_user_name": { 132 + "type": "string", 133 + "description": "Display/mention name at time of post", 134 + "example": "stahnma" 110 135 } 111 136 }, 112 137 "required": ["id", "url", "user", "created_at"], ··· 226 251 "type": "string" 227 252 }, 228 253 "description": "Tags associated with this quote" 254 + }, 255 + "source_type": { 256 + "type": "string", 257 + "description": "Source platform (e.g., irc, slack, discord, api, web)", 258 + "example": "slack" 259 + }, 260 + "source_network": { 261 + "type": "string", 262 + "description": "Source network identifier (e.g., IRC server, Slack team ID)", 263 + "example": "T12345" 264 + }, 265 + "source_channel": { 266 + "type": "string", 267 + "description": "Source channel identifier (e.g., IRC channel, Slack channel ID)", 268 + "example": "C67890" 269 + }, 270 + "source_user_id": { 271 + "type": "string", 272 + "description": "Platform-specific user ID", 273 + "example": "U99999" 274 + }, 275 + "source_user_name": { 276 + "type": "string", 277 + "description": "Display/mention name at time of post", 278 + "example": "stahnma" 229 279 } 230 280 }, 231 281 "required": ["id", "quote", "created_at"], ··· 468 518 "type": "string" 469 519 }, 470 520 "description": "Optional tags to add to the link (lowercased, no spaces)" 521 + }, 522 + "source_type": { 523 + "type": "string", 524 + "description": "Source platform (e.g., irc, slack, discord, api, web)", 525 + "example": "slack" 526 + }, 527 + "source_network": { 528 + "type": "string", 529 + "description": "Source network identifier (e.g., IRC server, Slack team ID)", 530 + "example": "T12345" 531 + }, 532 + "source_channel": { 533 + "type": "string", 534 + "description": "Source channel identifier (e.g., IRC channel, Slack channel ID)", 535 + "example": "C67890" 536 + }, 537 + "source_user_id": { 538 + "type": "string", 539 + "description": "Platform-specific user ID", 540 + "example": "U99999" 541 + }, 542 + "source_user_name": { 543 + "type": "string", 544 + "description": "Display/mention name at time of post", 545 + "example": "stahnma" 471 546 } 472 547 }, 473 548 "required": ["url", "user"], ··· 571 646 "type": "string" 572 647 }, 573 648 "description": "Optional tags to add to the quote (lowercased, no spaces)" 649 + }, 650 + "source_type": { 651 + "type": "string", 652 + "description": "Source platform (e.g., irc, slack, discord, api, web)", 653 + "example": "slack" 654 + }, 655 + "source_network": { 656 + "type": "string", 657 + "description": "Source network identifier (e.g., IRC server, Slack team ID)", 658 + "example": "T12345" 659 + }, 660 + "source_channel": { 661 + "type": "string", 662 + "description": "Source channel identifier (e.g., IRC channel, Slack channel ID)", 663 + "example": "C67890" 664 + }, 665 + "source_user_id": { 666 + "type": "string", 667 + "description": "Platform-specific user ID", 668 + "example": "U99999" 669 + }, 670 + "source_user_name": { 671 + "type": "string", 672 + "description": "Display/mention name at time of post", 673 + "example": "stahnma" 574 674 } 575 675 }, 576 676 "required": ["quote"], ··· 660 760 "schema": { 661 761 "type": "string" 662 762 } 763 + }, 764 + { 765 + "name": "source_type", 766 + "in": "query", 767 + "required": false, 768 + "schema": { "type": "string" }, 769 + "description": "Filter by source platform (e.g., irc, slack, discord)" 770 + }, 771 + { 772 + "name": "source_network", 773 + "in": "query", 774 + "required": false, 775 + "schema": { "type": "string" }, 776 + "description": "Filter by source network (requires source_type)" 777 + }, 778 + { 779 + "name": "source_channel", 780 + "in": "query", 781 + "required": false, 782 + "schema": { "type": "string" }, 783 + "description": "Filter by source channel (requires source_type and source_network)" 663 784 } 664 785 ], 665 786 "responses": { ··· 693 814 }, 694 815 "post": { 695 816 "summary": "Create Link", 696 - "description": "Submits a new link. Links are always created even if the URL was previously submitted. Duplicate information is included in the response.", 817 + "description": "Submits a new link. Links are always created even if the URL was previously submitted. Duplicate information is included in the response. When source fields (source_type, source_network, source_channel) are provided, duplicate detection is scoped per source: a URL is only considered a duplicate if it was previously submitted from the same source.", 697 818 "tags": ["Links"], 698 819 "requestBody": { 699 820 "required": true, ··· 707 828 }, 708 829 "responses": { 709 830 "201": { 710 - "description": "Link created successfully", 831 + "description": "Link created successfully. If duplicate detection finds a prior submission (scoped per source when source fields are provided), the response includes is_duplicate=true and previous_submissions. Returns 208 instead when the link is an exact duplicate within the same source scope.", 711 832 "content": { 712 833 "application/json": { 713 834 "schema": { ··· 882 1003 "default": 0, 883 1004 "minimum": 0 884 1005 } 1006 + }, 1007 + { 1008 + "name": "source_type", 1009 + "in": "query", 1010 + "required": false, 1011 + "schema": { "type": "string" }, 1012 + "description": "Filter by source platform (e.g., irc, slack, discord)" 1013 + }, 1014 + { 1015 + "name": "source_network", 1016 + "in": "query", 1017 + "required": false, 1018 + "schema": { "type": "string" }, 1019 + "description": "Filter by source network (requires source_type)" 1020 + }, 1021 + { 1022 + "name": "source_channel", 1023 + "in": "query", 1024 + "required": false, 1025 + "schema": { "type": "string" }, 1026 + "description": "Filter by source channel (requires source_type and source_network)" 885 1027 } 886 1028 ], 887 1029 "responses": { ··· 1688 1830 "default": 0, 1689 1831 "minimum": 0 1690 1832 } 1833 + }, 1834 + { 1835 + "name": "source_type", 1836 + "in": "query", 1837 + "required": false, 1838 + "schema": { "type": "string" }, 1839 + "description": "Filter by source platform (e.g., irc, slack, discord)" 1840 + }, 1841 + { 1842 + "name": "source_network", 1843 + "in": "query", 1844 + "required": false, 1845 + "schema": { "type": "string" }, 1846 + "description": "Filter by source network (requires source_type)" 1847 + }, 1848 + { 1849 + "name": "source_channel", 1850 + "in": "query", 1851 + "required": false, 1852 + "schema": { "type": "string" }, 1853 + "description": "Filter by source channel (requires source_type and source_network)" 1691 1854 } 1692 1855 ], 1693 1856 "responses": {