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 is x-miro and why is it being added to my resolved specs? #187

Closed
stephen-bartell opened this issue Oct 26, 2018 · 4 comments
Closed

Comments

@stephen-bartell
Copy link

I don't know if this is a bug, so it's a question. I see x-miro mentioned in #28, and I see some code to exclude it here

speccy/lib/linter.js

Lines 106 to 108 in 3d1cd3a

// Ignore vendor extensions, for reasons like our the resolver adding x-miro
const keys = Object.keys(object).filter(key => !key.startsWith('x-'));
should(keys.length).be.exactly(rule.properties);

On generated specs, x-miro is a filepath on whatever machine generated it.

I'm still not sure what it is and I'd rather filepaths on my local devbox not get leaked out in generated specs I plan on publishing

I'll take a link to read more about what x-miro, but for now what can I do about it getting added to my specs?

Node version: 8.11.2
Speccy Version: 0.8.4

One thing I do know is that it's a fantastic gif ... https://media.giphy.com/media/uasyG63aeiUq4/giphy.gif

@rockymontana
Copy link

I too find it odd to add local paths to the production yml-file.

@MikeRalphson
Copy link
Contributor

MikeRalphson commented Nov 5, 2018

Apologies, I thought I'd responded to this already.

x-miro is part of the fix for this issue Mermade/oas-kit#51 in the underlying library used for $ref resolution.

It preserves information about the original $ref which can be used by converters (such as swagger2openapi) and documentation tools (such as ReDoc) to ensure information valuable for conversion or display of schemas using discriminator is not lost.

In the next version of oas-kit creation of this annotation will be controlled by an option, and will be off by default. I'll update this issue when done.

@MikeRalphson
Copy link
Contributor

@philsturgeon feel free to transfer this issue to oas-kit if you prefer.

@philsturgeon
Copy link
Contributor

Fixed in #198

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

No branches or pull requests

4 participants