Skip to content

Commit

Permalink
feat: Generate thermostats (#87)
Browse files Browse the repository at this point in the history
* Generate thermostats

* Support parsing integer props and params

* ci: Generate code

* Update types

* ci: Generate code

---------

Co-authored-by: Andrii Balitskyi <[email protected]>
Co-authored-by: Seam Bot <[email protected]>
  • Loading branch information
3 people authored Sep 19, 2024
1 parent a743f15 commit 067587d
Show file tree
Hide file tree
Showing 7 changed files with 3,114 additions and 246 deletions.
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"zod": "^3.23.8"
},
"devDependencies": {
"@seamapi/types": "1.242.0",
"@seamapi/types": "1.245.1",
"@types/node": "^20.8.10",
"ava": "^6.0.1",
"c8": "^10.1.2",
Expand Down
6 changes: 5 additions & 1 deletion src/lib/blueprint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ export const createBlueprint = async (
const openapi = typesModule.openapi as Openapi

const isFakeData = openapi.info.title === 'Foo'
const targetPaths = ['/acs', '/events']
const targetPaths = ['/acs', '/events', '/thermostats']
const targetSchemas = [
'acs_access_group',
'acs_credential',
Expand All @@ -265,6 +265,8 @@ export const createBlueprint = async (
'acs_system',
'acs_user',
'event',
'climate_preset',
'thermostat_schedule',
]

const context = {
Expand Down Expand Up @@ -637,6 +639,7 @@ const createParameter = (
}
return { ...baseParam, format: 'record', jsonType: 'object' }
case 'number':
case 'integer':
return {
...baseParam,
format: 'number',
Expand Down Expand Up @@ -828,6 +831,7 @@ const createProperty = (
}
return { ...baseProperty, format: 'record', jsonType: 'object' }
case 'number':
case 'integer':
return {
...baseProperty,
format: 'number',
Expand Down
Loading

0 comments on commit 067587d

Please sign in to comment.