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

parsing subset of api spec #126

Open
nklskyoy opened this issue Feb 9, 2022 Discussed in #125 · 1 comment
Open

parsing subset of api spec #126

nklskyoy opened this issue Feb 9, 2022 Discussed in #125 · 1 comment
Labels
help wanted low priority Might be nice, but the priority is too low to do something about it.

Comments

@nklskyoy
Copy link

nklskyoy commented Feb 9, 2022

Discussed in #125

Originally posted by onikolskyy February 9, 2022
For some purpose, I would like to parse only the components part of a swagger api spec.

However, when I use ResolvingParser('apischemas/schemas.yaml'), I get the exception

prance.ValidationError: ("'paths' is a required property [...]

Here's my schemas.yaml

openapi: '3.0.0'

info:
  title: 'api'
  version: '0.2'

components:
  schemas:

    ANALYSIS:
      $ref: "./schemas/common/analysis.yaml"
    LAB:
      $ref: "./schemas/LAB.yaml"^
    FAB:
      $ref: "./schemas/FAB.yaml"
    OPS: 
      $ref: "./schemas/OPS.yaml"
    ICD:
      $ref: "./schemas/ICD.yaml"
    FALL:
      $ref: "./schemas/FALL.yaml"

Is there a way to resolve only th components property?

@RonnyPfannschmidt
Copy link
Owner

currently prance is designed to handle/resolve the full spec only

its not clear to me how to enable the subset

@RonnyPfannschmidt RonnyPfannschmidt added help wanted low priority Might be nice, but the priority is too low to do something about it. labels Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted low priority Might be nice, but the priority is too low to do something about it.
Projects
None yet
Development

No branches or pull requests

2 participants