Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IJsonSchema.IObject for object literal expression. #914

Merged
merged 1 commit into from
Dec 30, 2023
Merged

Conversation

samchon
Copy link
Owner

@samchon samchon commented Dec 30, 2023

When object literal expression type being used instead of named object type, typia had enrolled it into the IJsonComponents considering as a named type with __type and __type.o${number}.

However, it seems not suitable for purpose of the JSON schema spec. Therefore, I've added new type IJsonSchema.IObject and assigned it into the JSON schema values when object literal expression type being used.

What lilteral expression type means?

// NAMED TYPE
export interface IMember {
  id: string;
}

// LITERAL EXPRESSION
const member: { id: string };

When object literal expression type being used instead of named object type, `typia` had enrolled it into the `IJsonComponents` considering as a named type with `__type` and `__type.o${number}`.

However, it seems not suitable for purpose of the JSON schema spec. Therefore, I've added new type `IJsonSchema.IObject` and assigned it into the JSON schema values when object literal expression type being used.

> What lilteral expression type means?
>
> ```typescript
> // NAMED TYPE
> export interface IMember {
>   id: string;
> }
>
> // LITERAL EXPRESSION
> const member: { id: string };
> ```
@samchon samchon added the enhancement New feature or request label Dec 30, 2023
@samchon samchon self-assigned this Dec 30, 2023
Copy link
Owner Author

@samchon samchon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Succeeded to pass the test program.

@samchon samchon merged commit f3f01bb into master Dec 30, 2023
5 checks passed
@samchon samchon deleted the features/json branch December 30, 2023 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant