Skip to content

Commit

Permalink
update with typesettings and new version of bicep-types
Browse files Browse the repository at this point in the history
Signed-off-by: sk593 <shruthikumar@microsoft.com>
  • Loading branch information
sk593 committed May 28, 2024
1 parent cd4cdf5 commit f37db26
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
7 changes: 6 additions & 1 deletion hack/bicep-types-radius/generated/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,10 @@
"$ref": "applications/applications.messaging/2023-10-01-preview/types.json#/48"
}
},
"resourceFunctions": {}
"resourceFunctions": {},
"settings": {
"name": "radius",
"version": "latest",
"isSingleton": false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
#### Parameters
0. **someString**: string

### Function listArrayOfFoos
* **Output**: [FoosResponse](#foosresponse)[]
#### Parameters

## SystemData
### Properties
* **createdAt**: string: The timestamp of resource creation (UTC).
Expand Down
5 changes: 3 additions & 2 deletions hack/bicep-types-radius/src/generator/src/cmd/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ import { existsSync } from 'fs';
import { mkdir, rm, writeFile, readFile } from 'fs/promises';
import yargs from 'yargs';
import { Dictionary } from 'lodash';
import { TypeFile, buildIndex, readTypesJson, writeIndexJson, writeIndexMarkdown } from 'bicep-types';
import { TypeFile, buildIndex, readTypesJson, writeIndexJson, writeIndexMarkdown, TypeSettings } from 'bicep-types';
import { GeneratorConfig, getConfig } from '../config';
import * as markdown from '@ts-common/commonmark-to-markdown'
import * as yaml from 'js-yaml'
import { exec } from 'child_process';
import { copyRecursive, executeSynchronous, getLogger, lowerCaseCompare, logErr, logOut, ILogger, defaultLogger, executeCmd, findRecursive } from '../utils';

const rootDir = `${__dirname}/../../../../`;
Expand Down Expand Up @@ -254,7 +255,7 @@ async function buildTypeIndex(logger: ILogger, baseDir: string) {
types: readTypesJson(content),
});
}
const indexContent = await buildIndex(typeFiles, log => logOut(logger, log));
const indexContent = await buildIndex(typeFiles, log => logOut(logger, log), {name: "radius", version: "latest", isSingleton: false} as TypeSettings);

await writeFile(`${baseDir}/index.json`, writeIndexJson(indexContent));
await writeFile(`${baseDir}/index.md`, writeIndexMarkdown(indexContent));
Expand Down

0 comments on commit f37db26

Please sign in to comment.