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

The published OpenAPI spec fails the schema validation #1050

Open
kovaacs opened this issue Aug 14, 2023 · 0 comments
Open

The published OpenAPI spec fails the schema validation #1050

kovaacs opened this issue Aug 14, 2023 · 0 comments

Comments

@kovaacs
Copy link

kovaacs commented Aug 14, 2023

Hello,

I'm trying to autogenerate a Python client from the published OpenAPI specs, but all the different approaches I've tried fail because due to schema validation issues:

Using autorest 3.6.3 gives a pretty comprehensive breakdown of the issues:

error   | schema_violation | Schema violation: must be equal to one of the allowed values (paths > /api/analytics/v1/query/ > post > requestBody > content > application/json > schema > properties > metric_filters > properties > conditions > items > properties > condition > properties > value > type)
  allowedValues: array, boolean, integer, number, object, string
    - https://developers.piwik.pro/en/latest/_static/api/custom_reports_http_api.json:1:6087
error   | schema_violation | Schema violation: must be equal to one of the allowed values (paths > /api/analytics/v1/query/ > post > requestBody > content > application/json > schema > properties > options > properties > sampling > type)
  allowedValues: array, boolean, integer, number, object, string
    - https://developers.piwik.pro/en/latest/_static/api/custom_reports_http_api.json:1:7441
fatal   | Plugin 'schema-validator-openapi' completed with some error.
error   | schema_violation | Schema violation: must have required property 'examples' (paths > /api/analytics/v1/query/ > post > requestBody > content > application/json)
  missingProperty: examples
    - https://developers.piwik.pro/en/latest/_static/api/custom_reports_http_api.json:1:1185
error   | schema_violation | Schema violation: must match exactly one schema in oneOf (paths > /api/analytics/v1/query/ > post > requestBody > content > application/json)
  passingSchemas: null
    - https://developers.piwik.pro/en/latest/_static/api/custom_reports_http_api.json:1:1185
error   | schema_violation | Schema violation: must be string (paths > /api/analytics/v1/query/ > post > responses > 200 > content > application/json > schema > properties > data > items > description)
    - https://developers.piwik.pro/en/latest/_static/api/custom_reports_http_api.json:1:8696
error   | schema_violation | Schema violation: must have required property 'examples' (paths > /api/analytics/v1/query/ > post > responses > 200 > content > application/json)
  missingProperty: examples
    - https://developers.piwik.pro/en/latest/_static/api/custom_reports_http_api.json:1:8526
error   | schema_violation | Schema violation: must match exactly one schema in oneOf (paths > /api/analytics/v1/query/ > post > responses > 200 > content > application/json)
  passingSchemas: null
    - https://developers.piwik.pro/en/latest/_static/api/custom_reports_http_api.json:1:8526
error   | schema_violation | Schema violation: must be string (paths > /api/analytics/v1/sessions/ > post > responses > 200 > content > application/json > schema > properties > data > items > description)
    - https://developers.piwik.pro/en/latest/_static/api/custom_reports_http_api.json:1:16022
error   | schema_violation | Schema violation: must be equal to one of the allowed values (paths > /api/analytics/v1/sessions/ > post > responses > 200 > content > application/json > schema > properties > meta > properties > columns > items > type)
  allowedValues: array, boolean, integer, number, object, string
    - https://developers.piwik.pro/en/latest/_static/api/custom_reports_http_api.json:1:16234
error   | schema_violation | Schema violation: must have required property 'examples' (paths > /api/analytics/v1/sessions/ > post > responses > 200 > content > application/json)
  missingProperty: examples
    - https://developers.piwik.pro/en/latest/_static/api/custom_reports_http_api.json:1:15852
error   | schema_violation | Schema violation: must match exactly one schema in oneOf (paths > /api/analytics/v1/sessions/ > post > responses > 200 > content > application/json)
  passingSchemas: null
    - https://developers.piwik.pro/en/latest/_static/api/custom_reports_http_api.json:1:15852
error   | schema_violation | Schema violation: must be equal to one of the allowed values (paths > /api/analytics/v1/events/ > post > responses > 200 > content > application/json > schema > properties > meta > properties > columns > items > type)
  allowedValues: array, boolean, integer, number, object, string
    - https://developers.piwik.pro/en/latest/_static/api/custom_reports_http_api.json:1:23621
error   | schema_violation | Schema violation: must have required property 'examples' (paths > /api/analytics/v1/events/ > post > responses > 200 > content > application/json)
  missingProperty: examples
    - https://developers.piwik.pro/en/latest/_static/api/custom_reports_http_api.json:1:23260
error   | schema_violation | Schema violation: must match exactly one schema in oneOf (paths > /api/analytics/v1/events/ > post > responses > 200 > content > application/json)
  passingSchemas: null
    - https://developers.piwik.pro/en/latest/_static/api/custom_reports_http_api.json:1:23260
error   | schema_violation | Schema violation: must be equal to one of the allowed values (components > schemas > QueryRequest > properties > metric_filters > properties > conditions > items > properties > condition > properties > value > type)
  allowedValues: array, boolean, integer, number, object, string
    - https://developers.piwik.pro/en/latest/_static/api/custom_reports_http_api.json:1:30492
error   | schema_violation | Schema violation: must be equal to one of the allowed values (components > schemas > QueryRequest > properties > options > properties > sampling > type)
  allowedValues: array, boolean, integer, number, object, string
    - https://developers.piwik.pro/en/latest/_static/api/custom_reports_http_api.json:1:31846
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

1 participant