Skip to content

Issue 422 #771

New issue

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

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

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

maksim-kosolapov
Copy link

@maksim-kosolapov maksim-kosolapov commented Apr 20, 2025

Have fixed the StackOverflow issue. resolveComposedSchema populates properties from 'allOf/anyOf' refs and if they contain recursive reference it creates a recursive data structure which fails further.

But apart from StackOverflow issue the provided here openapi spec fails with detected changes for the response. That's weird, haven't managed to figure out why yet.

==========================================================================
==                            API CHANGE LOG                            ==
==========================================================================
           Smart Manufacturing Operation Management Service API           
--------------------------------------------------------------------------
--                            What's Changed                            --
--------------------------------------------------------------------------
- GET    /smartmom-svc/api/views/workorders/{id}
  Return Type:
    - Changed 200 OK
      Media types:
        - Changed application/json
          Schema: Backward compatible
--------------------------------------------------------------------------
--                                Result                                --
--------------------------------------------------------------------------
                   API changes are backward compatible                    
--------------------------------------------------------------------------

I think it makes sense to merge this fix and handle the response diff issue later.

closes #422

schema = addSchema(schema, composed);
if (composed.getProperties() != null
&& composed.getProperties().containsValue(composedSchema)) {
logger.warn(
Copy link
Author

@maksim-kosolapov maksim-kosolapov Apr 20, 2025

Choose a reason for hiding this comment

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

Shouldn't we fail in case of recursive refs? It's an invalid specification, isn't it

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

StackOverflowError during Processing
1 participant