SG-17839 API > Make api docs for the latest version

This commit is contained in:
Pankov 2025-09-19 15:26:21 +03:00
parent 0b55f34cbf
commit 36232e3d17
6 changed files with 21 additions and 33 deletions

View File

@ -49,7 +49,7 @@
"stats": "webpack --env production --env standalone --json --profile --mode=production > stats.json",
"prettier": "prettier --write \"src/**/*.{ts,tsx}\"",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1",
"lint": "eslint --fix 'src/**/*.{js,ts,tsx}' --cache",
"lint": "eslint --fix \"src/**/*.{js,ts,tsx}\" --cache",
"benchmark": "node ./benchmark/benchmark.js",
"start:demo": "webpack serve --hot --config demo/webpack.config.ts --mode=development",
"build:demo": "webpack --mode=production --config demo/webpack.config.ts",

View File

@ -3,7 +3,7 @@ import * as React from 'react';
import { DropdownOption, DropdownProps } from '../../common-elements/Dropdown';
import { MediaContentModel, MediaTypeModel, SchemaModel } from '../../services/models';
import { DropdownLabel, DropdownWrapper } from '../PayloadSamples/styled.elements';
// import { DropdownLabel, DropdownWrapper } from '../PayloadSamples/styled.elements';
export interface MediaTypeChildProps {
schema: SchemaModel;
@ -40,15 +40,15 @@ export class MediaTypesSwitch extends React.Component<MediaTypesSwitchProps> {
};
});
const Wrapper = ({ children }) =>
this.props.withLabel ? (
<DropdownWrapper>
<DropdownLabel>Content type</DropdownLabel>
{children}
</DropdownWrapper>
) : (
children
);
const Wrapper = ({ children }) => (this.props.withLabel ? <></> : children);
// this.props.withLabel ? (
// <DropdownWrapper>
// <DropdownLabel>Content type</DropdownLabel>
// {children}
// </DropdownWrapper>
// ) : (
// children
// );
return (
<>

View File

@ -29,12 +29,9 @@ export const ApiContentWrap = styled.div`
z-index: 1;
position: relative;
overflow: hidden;
width: calc(100% - ${props => props.theme.sidebar.width});
${media.lessThan('small', true)`
width: 100%;
`};
width: 100%;
contain: layout;
padding-left: 260px;
`;
export const BackgroundStub = styled.div`

View File

@ -7,8 +7,6 @@ import { OptionsContext } from '../OptionsProvider';
import { MenuItems } from './MenuItems';
import { PerfectScrollbarWrap } from '../../common-elements/perfect-scrollbar';
import { RedocAttribution } from './styled.elements';
import RedoclyLogo from './Logo';
@observer
export class SideMenu extends React.Component<{ menu: MenuStore; className?: string }> {
@ -27,12 +25,6 @@ export class SideMenu extends React.Component<{ menu: MenuStore; className?: str
}}
>
<MenuItems items={store.items} onActivate={this.activate} root={true} />
<RedocAttribution>
<a target="_blank" rel="noopener noreferrer" href="https://redocly.com/redoc/">
<RedoclyLogo />
API docs by Redocly
</a>
</RedocAttribution>
</PerfectScrollbarWrap>
);
}

View File

@ -36,13 +36,12 @@ const StyledStickySidebar = styled.div<{ $open?: boolean }>`
/* contain: strict; TODO: breaks layout since Chrome 80*/
height: 100vh;
position: sticky;
position: fixed;
position: -webkit-sticky;
top: 0;
z-index: 20;
${media.lessThan('small')`
position: fixed;
z-index: 20;
width: 100%;
background: ${({ theme }) => theme.sidebar.backgroundColor};
display: ${props => (props.$open ? 'flex' : 'none')};

View File

@ -222,12 +222,12 @@ export class OperationModel implements IMenuItem {
samples = [
...samples.slice(0, insertInx),
{
lang: 'payload',
label: 'Payload',
source: '',
requestBodyContent,
},
// {
// lang: 'payload',
// label: 'Payload',
// source: '',
// requestBodyContent,
// },
...samples.slice(insertInx),
];
}