prance
prance copied to clipboard
parsing subset of api spec
Discussed in https://github.com/RonnyPfannschmidt/prance/discussions/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?
currently prance is designed to handle/resolve the full spec only
its not clear to me how to enable the subset