question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

spectral does not resolve path->parameters->$ref

See original GitHub issue
/domains/{domainCode}:
  parameters:
    - $ref: "#/components/parameters/domainCode"

The domainCode is defined in components/parameters/domainCode but it complains:

- name: path-params
  summary: Path parameters are correct and valid.
  message: >-
    The path "**/domains/{domainCode}/models**" uses a parameter
    "**{domainCode}**" that does not have a corresponding definition.


    To fix, add a path parameter with the name "**domainCode**".
  path:
    - paths
    - '/domains/{domainCode}/models'
  severity: 50
  severityLabel: error

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
philsturgeoncommented, Apr 3, 2019

I completely understand. We can close this issue as the work is already on the roadmap, and it will be sooner rather than later don’t worry.

0reactions
blazeworxcommented, Apr 2, 2019

Thanks @philsturgeon. We have multiple (very) large API specs and we’ve spent a lot of time breaking them up into smaller files into a sane and logical folder/file structure so that maintaining them is easier (primarily because we do everything spec first). For now we’re still using speccy for linting in our pipeline because it handles external refs.

As mentioned earlier, I was able to get spectral lint working by using speccy resolve and then passing that to spectral lint but I do not want to introduce yet another dependency and step when speccy does the job in one step for now. I eventually want to replace speccy with spectral because we need more flexibility for custom rules and I like the error output which is a bit more informative. So I guess until https://github.com/stoplightio/json-ref-resolver can resolve external references then we’ll have to stick to what we have for now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Agilent VnmrJ 4 Command and Parameter Reference Guide
No part of this manual may be reproduced in any form or by any means (including electronic storage and retrieval or transla- tion...
Read more >
Create Better Quality API Documentation with Spectral
Spectral can help you find out if your OpenAPI is valid and matches your organization's style guide or even if your API has...
Read more >
The NIST Mass Spectral (MS) Search Program for Windows ...
The. EI Salt library contains 717 spectra of 672 compounds of low volatility not expected to be measurable by GC/MS. Limited annotation has...
Read more >
Quick Reference Guide
The spectrum parameters are now defined. As normally not all parameters have been specified for each spectrum file, some of the parameters may...
Read more >
Describing Parameters - Swagger
In OpenAPI, a path parameter is defined using in: path . ... If you want a query parameter that is not percent-encoded, add...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found