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

What schemas and components should be optimized? #88

Closed
KhudaDad414 opened this issue Mar 18, 2022 · 5 comments
Closed

What schemas and components should be optimized? #88

KhudaDad414 opened this issue Mar 18, 2022 · 5 comments
Labels
enhancement New feature or request stale

Comments

@KhudaDad414
Copy link
Member

Reason/Context

When I look at the output of the optimizer, it is more complicated than it should be. And that is what to be expected because we replace lots of schemas and components with $refs and that makes the file a little bit harder to grasp by humans. But how can we prevent the output from being over-complicated?

The problem

If we set the bar too low like: all schemas should be optimized, then the library will extract an unnecessary amount of schemas.
for example: if I have multiple instances of {type: string} then I want the optimizer to ignore it since by optimizing it, we make it complicated and hard to understand, without any gains.
I think we need to have some way of distinguishing the "optimization worthy" schemas.

Current Implementaton

After we merge #85, only the schemas that contain a type field will be considered for optimization. but that is not the perfect solution since not all schemas have a 'type' field.

Proposal

I was thinking about it and I couldn't find a perfect way to define a schema worth optimizing.
the best that I could come up with is:

a schema should be optimized if:

  • it has more than one non-object or non-array field
    OR
  • it has at least one object or array field.

open to suggestions.

@KhudaDad414 KhudaDad414 added the enhancement New feature or request label Mar 18, 2022
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added the stale label Jul 17, 2022
@github-actions github-actions bot removed the stale label Jul 29, 2022
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions
Copy link

github-actions bot commented Jun 8, 2023

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale
Projects
None yet
Development

No branches or pull requests

1 participant