You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[2] tmp/openapi.yaml:1650:38 at #/paths/~1scaffolding~1absolutely_abstract~1creative_concepts~1{absolutely_abstract_creative_concept_id}~1completely_concrete~1tangible_things/get/responses/200/content/application~1json/example/0/action_text_value
Example value must conform to the schema: `action_text_value` property type must be object,null.
1648 | super_select_value: three
1649 | text_area_value: MyText
1650 | action_text_value: MyText
1651 | created_at: '2023-01-01T00:00:00.000Z'
1652 | updated_at: '2023-01-02T00:00:00.000Z'
referenced from tmp/openapi.yaml:1630:15 at #/paths/~1scaffolding~1absolutely_abstract~1creative_concepts~1{absolutely_abstract_creative_concept_id}~1completely_concrete~1tangible_things/get/responses/200/content/application~1json
Warning was generated by the no-invalid-media-type-examples rule.
And one like this (which might be normal?):
[1] tmp/openapi.yaml:11:10 at #/servers/0/url
Server `url` should not point to example.com or localhost.
9 | version: "V1"
10 | servers:
11 | - url: http://localhost:3001/api/v1
12 | components:
13 | securitySchemes:
Warning was generated by the no-server-example.com rule.
@jagthedrummer For the first warning, there is an issue in Jbuilder, that unlike ERB, which calls to_s on ActionText objects, it doesn't do it and parses the whole object as it is.
We already monkey patch Jbuilder to return us strings instead of objects for ActionTexts, but it didn't work for Jbuilder::Schema, as it also overwrites Jbuilder methods. Here I added a PR which patches Jbuilder::Schema the same way, I think with it these errors should go.
--
I tried to avoid parsing ActionText in Jbuilder::Schema directly to mimic the original Jbuilder behaviour.
Thinking on how to update Jbuilder better, because also want to avoid adding dependencies.
--
Not sure where does second issue come from, will check.
I'm working on setting up this repo to run tests against the Bullet Train starter repo and in the process I've discovered that v2.6.4 of this gem is causing errors in the starter repo.
There are several errors like this:
And one like this (which might be normal?):
You can see a failing run here: https://github.com/bullet-train-co/jbuilder-schema/actions/runs/6907378005/job/18795175127#step:18:53
The text was updated successfully, but these errors were encountered: