speccy icon indicating copy to clipboard operation
speccy copied to clipboard

Bringing back reference-component-regex

Open philsturgeon opened this issue 6 years ago • 4 comments

The resolver is rewriting $refs, so it turns './schemas/parameters.yml#/Page' into '#/paths/~1v1~1conversations/get/parameters/1' and sometimes puts that value into x-miro instead.

We disabled this rule back in #28 to avoid the errors in #23, but we need to get it fixed up proper.

This approach to fixing it tries to use x-miro if its around and $ref is requested, but unfortunately that doesn't seem to work. Seems like $ref is actually rewritten in place without a x-miro to go with it. Sometimes. Dunno why.

philsturgeon avatar Apr 03 '18 21:04 philsturgeon

Any update on this issue or what's causing it? I see almost the same issue in Widdershins when using the --resolve flag in that tool. https://github.com/Mermade/widdershins/issues/170 was closed, but hasn't fixed our issue. Pointing all refs to #components/schemas/schemaName and then pointing those to the external file isn't feasible for us.

stownsend2121 avatar Sep 28 '18 21:09 stownsend2121

Hey, what is your issue? I think you are mistakenly relating your issue to this pull request, which is adding a rule, not fixing a bug.

The x-miro comments are about how this rule cannot be applied to $ref because it's rewritten. The fact that it's rewritten is not a bug that needs fixing, but this rule (or some of the logic in the rules engine) will need to change to support it.

philsturgeon avatar Sep 28 '18 22:09 philsturgeon

@MikeRalphson is this something you've looked at in oas-kit? I'd like to bring back reference-component-regex somehow.

philsturgeon avatar Sep 28 '18 22:09 philsturgeon

Sorry, I probably am mistaken...

I'll submit an actual issue with more details.

stownsend2121 avatar Sep 28 '18 23:09 stownsend2121