File tree Expand file tree Collapse file tree 25 files changed +281
-94
lines changed
getting-started-step-by-step
understanding-json-schema Expand file tree Collapse file tree 25 files changed +281
-94
lines changed Original file line number Diff line number Diff line change @@ -8,20 +8,21 @@ import { Headline1 } from '~/components/Headlines';
88import { SectionContext } from '~/context' ;
99import { DocsHelp } from '~/components/DocsHelp' ;
1010import NextPrevButton from '~/components/NavigationButtons' ;
11+ import type { Frontmatter } from '~/types/common' ;
1112
1213export async function getStaticPaths ( ) {
1314 return getStaticMarkdownPaths ( 'pages' ) ;
1415}
15- export async function getStaticProps ( args : any ) {
16+ export async function getStaticProps ( args : { params ?: { slug : string } } ) {
1617 return getStaticMarkdownProps ( args , 'pages' ) ;
1718}
1819
1920export default function StaticMarkdownPage ( {
2021 frontmatter,
2122 content,
2223} : {
23- frontmatter : any ;
24- content : any ;
24+ frontmatter : Frontmatter ;
25+ content : string ;
2526} ) {
2627 const fileRenderType = '_md' ;
2728 const newTitle = 'JSON Schema - ' + frontmatter . title ;
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export async function getStaticProps() {
2626export default function ambassadorPages ( {
2727 ambassadorData,
2828} : {
29- ambassadorData : any ;
29+ ambassadorData : string ;
3030} ) {
3131 return (
3232 < SectionContext . Provider value = 'ambassador' >
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import DocTable from '~/components/DocTable';
88import { Headline1 } from '~/components/Headlines' ;
99import { DocsHelp } from '~/components/DocsHelp' ;
1010import NextPrevButton from '~/components/NavigationButtons' ;
11+ import { Frontmatter } from '~/types/common' ;
1112
1213export async function getStaticProps ( ) {
1314 const index = fs . readFileSync ( 'pages/draft-05/index.md' , 'utf-8' ) ;
@@ -27,12 +28,23 @@ export async function getStaticProps() {
2728 } ;
2829}
2930
31+ interface DraftFrontmatter extends Frontmatter {
32+ Specification ?: string ;
33+ Published ?: string ;
34+ Metaschema ?: string ;
35+ }
36+
37+ interface BlocksData {
38+ index : string ;
39+ body : string ;
40+ }
41+
3042export default function ImplementationsPages ( {
3143 blocks,
3244 frontmatter,
3345} : {
34- blocks : any ;
35- frontmatter : any ;
46+ blocks : BlocksData ;
47+ frontmatter : DraftFrontmatter ;
3648} ) {
3749 const fileRenderType = 'indexmd' ;
3850 return (
Original file line number Diff line number Diff line change @@ -7,26 +7,27 @@ import getStaticMarkdownProps from '~/lib/getStaticMarkdownProps';
77import { Headline1 } from '~/components/Headlines' ;
88import { SectionContext } from '~/context' ;
99import { DocsHelp } from '~/components/DocsHelp' ;
10+ import { Frontmatter } from '~/types/common' ;
1011
1112export async function getStaticPaths ( ) {
1213 return getStaticMarkdownPaths ( 'pages/draft-06' ) ;
1314}
14- export async function getStaticProps ( args : any ) {
15+ export async function getStaticProps ( args : { params ?: { slug : string } } ) {
1516 return getStaticMarkdownProps ( args , 'pages/draft-06' ) ;
1617}
1718
1819export default function StaticMarkdownPage ( {
1920 frontmatter,
2021 content,
2122} : {
22- frontmatter : any ;
23- content : any ;
23+ frontmatter : Frontmatter ;
24+ content : string ;
2425} ) {
2526 const fileRenderType = '_md' ;
2627 const newTitle = 'JSON Schema - ' + frontmatter . title ;
2728
2829 return (
29- < SectionContext . Provider value = { frontmatter . section || null } >
30+ < SectionContext . Provider value = { frontmatter . section ?? null } >
3031 < Head >
3132 < title > { newTitle } </ title >
3233 </ Head >
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import DocTable from '~/components/DocTable';
88import { Headline1 } from '~/components/Headlines' ;
99import { DocsHelp } from '~/components/DocsHelp' ;
1010import NextPrevButton from '~/components/NavigationButtons' ;
11+ import { Frontmatter } from '~/types/common' ;
1112
1213export async function getStaticProps ( ) {
1314 const index = fs . readFileSync ( 'pages/draft-06/index.md' , 'utf-8' ) ;
@@ -25,12 +26,22 @@ export async function getStaticProps() {
2526 } ;
2627}
2728
29+ interface DraftFrontmatter extends Frontmatter {
30+ Specification ?: string ;
31+ Published ?: string ;
32+ Metaschema ?: string ;
33+ }
34+
35+ interface BlocksData {
36+ index : string ;
37+ }
38+
2839export default function ImplementationsPages ( {
2940 blocks,
3041 frontmatter,
3142} : {
32- blocks : any ;
33- frontmatter : any ;
43+ blocks : BlocksData ;
44+ frontmatter : DraftFrontmatter ;
3445} ) {
3546 const fileRenderType = 'indexmd' ;
3647 return (
Original file line number Diff line number Diff line change @@ -7,26 +7,27 @@ import getStaticMarkdownProps from '~/lib/getStaticMarkdownProps';
77import { Headline1 } from '~/components/Headlines' ;
88import { SectionContext } from '~/context' ;
99import { DocsHelp } from '~/components/DocsHelp' ;
10+ import { Frontmatter } from '~/types/common' ;
1011
1112export async function getStaticPaths ( ) {
1213 return getStaticMarkdownPaths ( 'pages/draft-07' ) ;
1314}
14- export async function getStaticProps ( args : any ) {
15+ export async function getStaticProps ( args : { params ?: { slug : string } } ) {
1516 return getStaticMarkdownProps ( args , 'pages/draft-07' ) ;
1617}
1718
1819export default function StaticMarkdownPage ( {
1920 frontmatter,
2021 content,
2122} : {
22- frontmatter : any ;
23- content : any ;
23+ frontmatter : Frontmatter ;
24+ content : string ;
2425} ) {
2526 const fileRenderType = '_md' ;
2627 const newTitle = 'JSON Schema - ' + frontmatter . title ;
2728
2829 return (
29- < SectionContext . Provider value = { frontmatter . section || null } >
30+ < SectionContext . Provider value = { frontmatter . section ?? null } >
3031 < Head >
3132 < title > { newTitle } </ title >
3233 </ Head >
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import DocTable from '~/components/DocTable';
88import { Headline1 } from '~/components/Headlines' ;
99import { DocsHelp } from '~/components/DocsHelp' ;
1010import NextPrevButton from '~/components/NavigationButtons' ;
11+ import { Frontmatter } from '~/types/common' ;
1112
1213export async function getStaticProps ( ) {
1314 const index = fs . readFileSync ( 'pages/draft-07/index.md' , 'utf-8' ) ;
@@ -25,12 +26,22 @@ export async function getStaticProps() {
2526 } ;
2627}
2728
29+ interface DraftFrontmatter extends Frontmatter {
30+ Specification ?: string ;
31+ Published ?: string ;
32+ Metaschema ?: string ;
33+ }
34+
35+ interface BlocksData {
36+ index : string ;
37+ }
38+
2839export default function ImplementationsPages ( {
2940 blocks,
3041 frontmatter,
3142} : {
32- blocks : any ;
33- frontmatter : any ;
43+ blocks : BlocksData ;
44+ frontmatter : DraftFrontmatter ;
3445} ) {
3546 const fileRenderType = 'indexmd' ;
3647 return (
Original file line number Diff line number Diff line change @@ -7,26 +7,27 @@ import getStaticMarkdownProps from '~/lib/getStaticMarkdownProps';
77import { Headline1 } from '~/components/Headlines' ;
88import { SectionContext } from '~/context' ;
99import { DocsHelp } from '~/components/DocsHelp' ;
10+ import { Frontmatter } from '~/types/common' ;
1011
1112export async function getStaticPaths ( ) {
1213 return getStaticMarkdownPaths ( 'pages/draft/2019-09' ) ;
1314}
14- export async function getStaticProps ( args : any ) {
15+ export async function getStaticProps ( args : { params ?: { slug : string } } ) {
1516 return getStaticMarkdownProps ( args , 'pages/draft/2019-09' ) ;
1617}
1718
1819export default function StaticMarkdownPage ( {
1920 frontmatter,
2021 content,
2122} : {
22- frontmatter : any ;
23- content : any ;
23+ frontmatter : Frontmatter ;
24+ content : string ;
2425} ) {
2526 const fileRenderType = '_md' ;
2627 const newTitle = 'JSON Schema - ' + frontmatter . title ;
2728
2829 return (
29- < SectionContext . Provider value = { frontmatter . section || null } >
30+ < SectionContext . Provider value = { frontmatter . section ?? null } >
3031 < Head >
3132 < title > { newTitle } </ title >
3233 </ Head >
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import DocTable from '~/components/DocTable';
88import { Headline1 } from '~/components/Headlines' ;
99import { DocsHelp } from '~/components/DocsHelp' ;
1010import NextPrevButton from '~/components/NavigationButtons' ;
11+ import { Frontmatter } from '~/types/common' ;
1112
1213export async function getStaticProps ( ) {
1314 const index = fs . readFileSync ( 'pages/draft/2019-09/index.md' , 'utf-8' ) ;
@@ -24,12 +25,22 @@ export async function getStaticProps() {
2425 } ;
2526}
2627
28+ interface DraftFrontmatter extends Frontmatter {
29+ Specification ?: string ;
30+ Published ?: string ;
31+ Metaschema ?: string ;
32+ }
33+
34+ interface BlocksData {
35+ index : string ;
36+ }
37+
2738export default function ImplementationsPages ( {
2839 blocks,
2940 frontmatter,
3041} : {
31- blocks : any ;
32- frontmatter : any ;
42+ blocks : BlocksData ;
43+ frontmatter : DraftFrontmatter ;
3344} ) {
3445 const fileRenderType = 'indexmd' ;
3546 return (
Original file line number Diff line number Diff line change @@ -7,26 +7,27 @@ import getStaticMarkdownProps from '~/lib/getStaticMarkdownProps';
77import { Headline1 } from '~/components/Headlines' ;
88import { SectionContext } from '~/context' ;
99import { DocsHelp } from '~/components/DocsHelp' ;
10+ import { Frontmatter } from '~/types/common' ;
1011
1112export async function getStaticPaths ( ) {
1213 return getStaticMarkdownPaths ( 'pages/draft/2020-12' ) ;
1314}
14- export async function getStaticProps ( args : any ) {
15+ export async function getStaticProps ( args : { params ?: { slug : string } } ) {
1516 return getStaticMarkdownProps ( args , 'pages/draft/2020-12' ) ;
1617}
1718
1819export default function StaticMarkdownPage ( {
1920 frontmatter,
2021 content,
2122} : {
22- frontmatter : any ;
23- content : any ;
23+ frontmatter : Frontmatter ;
24+ content : string ;
2425} ) {
2526 const fileRenderType = '_md' ;
2627 const newTitle = 'JSON Schema - ' + frontmatter . title ;
2728
2829 return (
29- < SectionContext . Provider value = { frontmatter . section || null } >
30+ < SectionContext . Provider value = { frontmatter . section ?? null } >
3031 < Head >
3132 < title > { newTitle } </ title >
3233 </ Head >
You can’t perform that action at this time.
0 commit comments