diff --git a/docs/dist/feeds-v3-note.js b/docs/dist/feeds-v3-note.js new file mode 100644 index 000000000..d8707ef9f --- /dev/null +++ b/docs/dist/feeds-v3-note.js @@ -0,0 +1,30 @@ +// The Feeds v3 spec is generated into openapi/v2/ because v2 is the version of +// the spec generator, not the Feeds product. Show a note above the spec title +// so readers aren't misled by the path. +window.FeedsV3NotePlugin = function () { + return { + wrapComponents: { + info: (Original, system) => (props) => { + const React = system.React; + const original = React.createElement(Original, props); + if (!/\/openapi\/v2\/feeds-/.test(system.specSelectors.url())) { + return original; + } + return React.createElement( + 'div', + null, + React.createElement( + 'div', + { className: 'feeds-v3-note' }, + React.createElement('strong', null, 'Feeds v3 API. '), + 'This spec lives under ', + React.createElement('code', null, 'openapi/v2/'), + ' because v2 is the version of the OpenAPI spec, not the Feeds ' + + 'product version.', + ), + original, + ); + }, + }, + }; +}; diff --git a/docs/dist/index.css b/docs/dist/index.css index f2376fdaa..0472b47f8 100644 --- a/docs/dist/index.css +++ b/docs/dist/index.css @@ -14,3 +14,13 @@ body { margin: 0; background: #fafafa; } + +.feeds-v3-note { + margin: 0 0 16px; + padding: 10px 14px; + border-left: 4px solid #4990e2; + background: #eaf3fd; + font-family: sans-serif; + font-size: 14px; + color: #3b4151; +} diff --git a/docs/dist/swagger-initializer.js b/docs/dist/swagger-initializer.js index 7f751bcfa..4f82339a3 100644 --- a/docs/dist/swagger-initializer.js +++ b/docs/dist/swagger-initializer.js @@ -21,11 +21,15 @@ window.onload = function () { name: 'Moderation v2', url: 'https://raw.githubusercontent.com/GetStream/protocol/main/openapi/v2/moderation-serverside-api.yaml', }, + { + name: 'Feeds v3', + url: 'https://raw.githubusercontent.com/GetStream/protocol/main/openapi/v2/feeds-serverside-api.yaml', + }, ], dom_id: '#swagger-ui', deepLinking: true, presets: [SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset], - plugins: [SwaggerUIBundle.plugins.DownloadUrl], + plugins: [SwaggerUIBundle.plugins.DownloadUrl, FeedsV3NotePlugin], layout: 'StandaloneLayout', }); }; diff --git a/docs/dist/swagger-initializer_feeds_v2.js b/docs/dist/swagger-initializer_feeds_v2.js new file mode 100644 index 000000000..ab6b29b49 --- /dev/null +++ b/docs/dist/swagger-initializer_feeds_v2.js @@ -0,0 +1,10 @@ +window.onload = function () { + window.ui = SwaggerUIBundle({ + url: 'https://raw.githubusercontent.com/GetStream/protocol/main/openapi/v2/feeds-serverside-api.yaml', + dom_id: '#swagger-ui', + deepLinking: true, + presets: [SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset], + plugins: [SwaggerUIBundle.plugins.DownloadUrl, FeedsV3NotePlugin], + layout: 'StandaloneLayout', + }); +}; diff --git a/docs/feeds_v2_openapi.html b/docs/feeds_v2_openapi.html new file mode 100644 index 000000000..d70c17524 --- /dev/null +++ b/docs/feeds_v2_openapi.html @@ -0,0 +1,35 @@ + + + +
+ +