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

Schemas converted to String type, when default content type changed to application/yaml #756

Closed
MrOli1412 opened this issue May 14, 2024 · 6 comments
Labels
bug Something isn't working staged for release

Comments

@MrOli1412
Copy link

Describe the bug
When I changed default-content-type to application/yaml
generated file and springwolf-ui received in Schemas section all POJO's as String object.

Dependencies and versions used
tested on latest master version(1.3.0-SNAPSHOT) and 1.2.0 of
springwolf-amqp
springwolf-ui

Code example
Proper working
springwolf.docket.default-content-type=application/json (default)
proper_working

Issue
springwolf.docket.default-content-type=application/yaml
I was working on yours AMQP example (https://github.com/springwolf/springwolf-core/tree/master/springwolf-examples/springwolf-amqp-example), and I changed default-content-type in docker-compose.yaml

version: '3'
services:
  app:
    image: stavshamir/springwolf-amqp-example:${SPRINGWOLF_VERSION}
    environment:
      - SPRINGWOLF_DOCKET_DEFAULT-CONTENT-TYPE=application/yaml
    links:
      - amqp
    ports:
      - "8080:8080"
    depends_on:
      - amqp

  amqp:
    image: rabbitmq:3.8-management-alpine
    ports:
      # AMQP protocol port
      - '5672:5672'
      # HTTP management UI
      - '15672:15672'

Result:
issue

@MrOli1412 MrOli1412 added the bug Something isn't working label May 14, 2024
Copy link

Welcome to Springwolf. Thanks a lot for reporting your first issue. Please check out our contributors guide and feel free to join us on discord.

@timonback
Copy link
Member

@timonback
Copy link
Member

We suggested the code change stoplightio/spectral#2625, which we believe will address the underlying issue.

When merged & released, we will remove the workaround from Springwolf.

Copy link

The change is staged for release and will be part of the next release.

If you want to try and verify it in your application today,
use the latest 1.X.0-SNAPSHOT build as described in our README.md > Testing SNAPSHOT version

Thank you for the report/contribution!

@timonback
Copy link
Member

Hi @MrOli1412,
as a workaround, we introduced with the latest release a configuration property springwolf.studio-compatibility, which you can disable to avoid "fixing" the schema type for yaml content-type.

Copy link

The change is available in the latest release. 🎉

Thank you for the report/contribution and making Springwolf better!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working staged for release
Projects
None yet
Development

No branches or pull requests

2 participants