Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Need of recursive properties check in validation #372

Open
@Jay-Gohil

Description

@Jay-Gohil

Some APIs contain nested schemas, and the current version of 0.7.1 openapi-spec-validator is unable catch the recursive properties. Below is an example of what can be achieved with a little tweak in the class SchemaValidator validation/keywords.py.

nested_properties= []if"allOf"inschema:all_of=schema/"allOf"whileTrue:forinner_schemainall_of:yieldfromself(inner_schema,require_properties=False,                  )if"properties"notininner_schema:continueinner_schema_props=inner_schema/"properties"inner_schema_props_keys=inner_schema_props.keys()nested_properties+=list(inner_schema_props_keys)if"allOf"notininner_schema:breakall_of=inner_schema/"allOf"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp