diff --git a/.gitignore b/.gitignore index a15f454..496f987 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .DS_Store node_modules .env -src/generated \ No newline at end of file +src/generated +.idea \ No newline at end of file diff --git a/openapi-ts.config.ts b/openapi-ts.config.ts index cd9b968..643cff4 100644 --- a/openapi-ts.config.ts +++ b/openapi-ts.config.ts @@ -1,6 +1,8 @@ +import "dotenv/config"; import { defineConfig } from "@hey-api/openapi-ts"; +import * as process from "node:process"; export default defineConfig({ - input: "https://api.aurora.paradym.id/openapi-docs.json", + input: `${process.env.SERVER}/openapi-docs.json`, output: "src/generated", }); diff --git a/src/index.ts b/src/index.ts index 29a6ec8..200097f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -28,7 +28,7 @@ async function run() { }, type: "EmployeeBadge", revocable: false, - fields: { + attributes: { first_name: { type: "string", title: "First Name", @@ -62,7 +62,7 @@ async function run() { required: true, }, }, - defaultFields: { + defaultAttributes: { expiration: { required: true, default: { @@ -86,7 +86,7 @@ async function run() { credentials: [ { format: "sd-jwt-vc", - fields: { + attributes: { first_name: { type: "string", const: "John", @@ -112,7 +112,7 @@ async function run() { credentials: [ { credentialTemplateId: credentialTemplate.id, - fields: { + attributes: { first_name: "John", last_name: "Doe", employee_id: "123",