Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions docs/next.config.js → docs/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
const withNextra = require('nextra')({
import nextra from 'nextra'

const withNextra = nextra({
theme: 'nextra-theme-docs',
themeConfig: './theme.config.jsx',
defaultShowCopyCode: true,
staticImage: true,
latex: true,
flexsearch: {
codeblocks: false
}
})

module.exports = withNextra({
export default withNextra({
reactStrictMode: true,
images: {
unoptimized: true
Expand All @@ -24,4 +22,4 @@ module.exports = withNextra({
},
]
}
})
})
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
},
"dependencies": {
"next": "^14.0.0",
"nextra": "^2.13.2",
"nextra-theme-docs": "^2.13.2",
"nextra": "^3.0.0",
"nextra-theme-docs": "^3.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
Expand Down
5 changes: 5 additions & 0 deletions docs/pages/_app.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import 'nextra-theme-docs/style.css'

export default function App({ Component, pageProps }) {
return <Component {...pageProps} />
}
6 changes: 6 additions & 0 deletions docs/pages/_meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
index: { title: 'Introduction' },
'getting-started': { title: 'Getting Started' },
generators: { title: 'Generators' },
sinks: { title: 'Sinks' }
}
6 changes: 0 additions & 6 deletions docs/pages/_meta.json

This file was deleted.

8 changes: 8 additions & 0 deletions docs/pages/sinks/_meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export default {
index: { title: 'Overview' },
csv: { title: 'CSV Sink' },
kafka: { title: 'Kafka Sink' },
webhook: { title: 'Webhook Sink' },
yield: { title: 'Yield Sink' },
custom: { title: 'Custom Sink' }
}
8 changes: 0 additions & 8 deletions docs/pages/sinks/_meta.json

This file was deleted.

8 changes: 2 additions & 6 deletions docs/theme.config.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ export default {
footer: {
text: `GlassGen ${new Date().getFullYear()} © GlassFlow.`
},
useNextSeoProps() {
return {
titleTemplate: '%s – GlassGen'
}
},
head: (
<>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
Expand All @@ -30,5 +25,6 @@ export default {
</>
),
primaryHue: 210,
primarySaturation: 100
primarySaturation: 100,
titleSuffix: ' – GlassGen'
}
4 changes: 2 additions & 2 deletions glassgen/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Dict, Optional
from typing import Any, Dict, List, Optional

from pydantic import BaseModel, Field, ValidationError, model_validator

Expand Down Expand Up @@ -96,7 +96,7 @@ def _field_exists_in_schema(self, field_path: str, schema: Dict[str, Any]) -> bo

def _get_all_field_paths(
self, schema: Dict[str, Any], prefix: str = ""
) -> list[str]:
) -> List[str]:
"""Get all possible field paths in the schema, including nested ones"""
paths = []
for key, value in schema.items():
Expand Down
6 changes: 3 additions & 3 deletions glassgen/generator/generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,9 @@ def _register_default_generators(self):
GeneratorType.UUID: lambda: str(self._faker.uuid4()),
GeneratorType.NAME: self._faker.name,
GeneratorType.TEXT: self._faker.text,
GeneratorType.ADDRESS: lambda: self._faker.address()
.replace("\n", " ")
.strip(),
GeneratorType.ADDRESS: lambda: (
self._faker.address().replace("\n", " ").strip()
),
GeneratorType.PHONE_NUMBER: self._faker.phone_number,
GeneratorType.JOB: self._faker.job,
GeneratorType.COMPANY: self._faker.company,
Expand Down
Loading