File tree Expand file tree Collapse file tree 8 files changed +55
-77
lines changed Expand file tree Collapse file tree 8 files changed +55
-77
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @gitbook/openapi-parser ' : patch
3+ ' @gitbook/react-openapi ' : patch
4+ ---
5+
6+ Bump Scalar
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 1111 "version" : " 3.0.4" ,
1212 "sideEffects" : false ,
1313 "dependencies" : {
14- "@scalar/json-magic" : " ^0.3 .1" ,
15- "@scalar/openapi-parser" : " ^0.20.1 " ,
16- "@scalar/openapi-types" : " ^0.3.7 "
14+ "@scalar/json-magic" : " ^0.8 .1" ,
15+ "@scalar/openapi-parser" : " ^0.23.2 " ,
16+ "@scalar/openapi-types" : " ^0.5.1 "
1717 },
1818 "devDependencies" : {
1919 "@tsconfig/strictest" : " catalog:" ,
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ export const fetchURL = (): Plugin => ({
2020 return {
2121 ok : true ,
2222 data : normalize ( text ) ,
23+ raw : text ,
2324 } ;
2425 } catch {
2526 return { ok : false } ;
Original file line number Diff line number Diff line change @@ -59,10 +59,11 @@ export const fetchURLs = (customConfiguration: {
5959 }
6060 const text = await response . text ( ) ;
6161 // Try to normalize the text to be sure it's a valid JSON or YAML.
62- await normalize ( text ) ;
62+ const normalized = await normalize ( text ) ;
6363 return {
6464 ok : true ,
65- data : text ,
65+ data : normalized ,
66+ raw : text ,
6667 } ;
6768 } catch {
6869 return { ok : false } ;
Original file line number Diff line number Diff line change 1313 "@gitbook/expr" : " workspace:*" ,
1414 "@gitbook/openapi-parser" : " workspace:*" ,
1515 "@scalar/api-client-react" : " catalog:" ,
16- "@scalar/oas-utils" : " ^0.2.130 " ,
17- "@scalar/types" : " ^0.1.9 " ,
16+ "@scalar/oas-utils" : " ^0.6.3 " ,
17+ "@scalar/types" : " ^0.4.0 " ,
1818 "classnames" : " catalog:" ,
1919 "flatted" : " ^3.2.9" ,
2020 "json-xml-parse" : " ^1.3.0" ,
Original file line number Diff line number Diff line change @@ -91,7 +91,8 @@ function groupParameters(
9191 const label = getParameterGroupName ( parameter . in , context ) ;
9292 const group = groups . find ( ( group ) => group . key === key ) ;
9393 if ( group ) {
94- group . parameters . push ( parameter ) ;
94+ // Use spread to avoid type issues with complex union type in OpenAPI.Parameters
95+ group . parameters = [ ...group . parameters , parameter ] as OpenAPI . Parameters ;
9596 } else {
9697 groups . push ( {
9798 key,
Original file line number Diff line number Diff line change @@ -85,9 +85,7 @@ function ScalarModal(props: {
8585 return (
8686 < ApiClientModalProvider
8787 configuration = { { url : specUrl , ...prefillConfig } }
88- initialRequest = {
89- method !== 'connect' ? { method : toScalarHttpMethod ( method ) , path } : undefined
90- }
88+ initialRequest = { { method : toScalarHttpMethod ( method ) , path } }
9189 >
9290 < ScalarModalController method = { method } path = { path } controllerRef = { controllerRef } />
9391 </ ApiClientModalProvider >
@@ -112,7 +110,7 @@ function ScalarModalController(props: {
112110 const openScalarClient = client ?. open ;
113111 const { onOpenClient : trackClientOpening } = useOpenAPIOperationContext ( ) ;
114112 const openClient = useMemo ( ( ) => {
115- if ( openScalarClient && method !== 'connect' ) {
113+ if ( openScalarClient ) {
116114 return ( ) => {
117115 openScalarClient ( {
118116 method : toScalarHttpMethod ( method ) ,
You can’t perform that action at this time.
0 commit comments