-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #250 from jellydn/246-withswagger-doesnt-include-s…
…chema-stored-in-non-pages-folder-to-serve-in-vercel Support load yaml/json files on public folder
- Loading branch information
Showing
24 changed files
with
2,999 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), | ||
and is generated by [Changie](https://github.com/miniscruff/changie). |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
changesDir: .changes | ||
unreleasedDir: unreleased | ||
headerPath: header.tpl.md | ||
versionHeaderPath: "" | ||
versionFooterPath: "" | ||
changelogPath: CHANGELOG.md | ||
versionExt: md | ||
versionFormat: '## {{.Version}} - {{.Time.Format "2006-01-02"}}' | ||
kindFormat: '### {{.Kind}}' | ||
changeFormat: '* {{.Body}}' | ||
headerFormat: "" | ||
footerFormat: "" | ||
kinds: | ||
- label: Added | ||
- label: Changed | ||
- label: Deprecated | ||
- label: Removed | ||
- label: Fixed | ||
- label: Security |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), | ||
and is generated by [Changie](https://github.com/miniscruff/changie). | ||
|
||
No releases yet, this file will be updated when generating your first release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"packages": [ | ||
"../" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
compiler: { | ||
// ssr and displayName are configured by default | ||
styledComponents: true, | ||
removeConsole: true, | ||
swcMinify: true, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import '@stoplight/elements/styles.min.css'; | ||
import { | ||
Preflight, | ||
ThemeProvider, | ||
defaultTheme, | ||
x, | ||
} from '@xstyled/styled-components'; | ||
import dynamic from 'next/dynamic'; | ||
import Head from 'next/head'; | ||
|
||
const APIDocumentUI = dynamic<{ | ||
apiDescriptionUrl: string; | ||
layout?: 'sidebar' | 'stacked'; | ||
router?: 'history' | 'memory' | 'hash' | 'static'; | ||
}>( | ||
import('@stoplight/elements').then(({ API }) => API), | ||
{ | ||
ssr: false, | ||
loading: () => <p>Loading...</p>, | ||
}, | ||
); | ||
|
||
const theme = { | ||
...defaultTheme, | ||
// Customize your theme here | ||
colors: { | ||
text: '#000', | ||
background: '#fff', | ||
primary: '#07c', | ||
modes: { | ||
dark: { | ||
text: '#fff', | ||
background: '#000', | ||
primary: '#0cf', | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export default function Playground() { | ||
return ( | ||
<ThemeProvider theme={theme}> | ||
<x.div h="100vh" mx="auto"> | ||
<Preflight /> | ||
<Head> | ||
<title>Next Swagger Doc Demo App</title> | ||
<meta name="description" content="Generated by create next app" /> | ||
<link rel="icon" href="/favicon.ico" /> | ||
</Head> | ||
<APIDocumentUI | ||
apiDescriptionUrl="/api/doc" | ||
layout="sidebar" | ||
router="hash" | ||
/> | ||
</x.div> | ||
</ThemeProvider> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
openapi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// import original module declarations | ||
import { | ||
ITheme, | ||
DefaultTheme as XStyledDefaultTheme, | ||
} from '@xstyled/styled-components'; | ||
import '@xstyled/system'; | ||
import 'styled-components'; | ||
|
||
interface AppTheme extends ITheme, XStyledDefaultTheme { | ||
/* Customize your theme */ | ||
} | ||
|
||
// and extend them! | ||
declare module '@xstyled/system' { | ||
export interface Theme extends AppTheme {} | ||
} | ||
declare module 'styled-components' { | ||
export interface DefaultTheme extends AppTheme {} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ | |
}, | ||
"include": [ | ||
"next-env.d.ts", | ||
"styled.d.ts", | ||
"**/*.ts", | ||
"**/*.tsx" | ||
], | ||
|
Oops, something went wrong.
709aaae
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
next-swagger-doc – ./
next-swagger-doc-git-main-dunghd.vercel.app
next-swagger-doc-dunghd.vercel.app
next-swagger-doc.vercel.app
next-swagger-doc.productsway.com
709aaae
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
next-swagger-doc-demo – ./example
next-swagger-doc-demo.vercel.app
next-swagger-doc-demo.productsway.com
next-swagger-doc-demo-git-main-dunghd.vercel.app
next-swagger-doc-demo-dunghd.vercel.app