Description
Describe the bug
Thanks for creating this; I love how explicit it is on errors and warnings!
I am currently encountering this warning:
WARNING parsing POST /2.1/jobs/create within default. Endpoint will not be generated.
Cannot take allOf a non-object
Raised from here. However, I don't fully understand this error, specifically what is a non-object
.
Here is the contents that it warns on:
/2.1/jobs/create:
...
requestBody:
required: true
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/JobSettings'
- $ref: '#/components/schemas/AccessControlList'
I double checked to make sure these reference schemas exist:
JobSettings:
properties:
name:
type: string
example: A multitask job
...
AccessControlList:
type: object
properties:
access_control_list:
type: array
description: List of permissions to set on the job.
items:
$ref: '#/components/schemas/AccessControlRequest'
Any thoughts and suggestions appreciated!
To Reproduce
Steps to reproduce the behavior:
wget https://docs.databricks.com/_static/api-refs/jobs-2.1-aws.yaml
- Try running
openapi-python-client generate --path jobs-2.1-aws.yaml
which results in multiple errors similar to:
components -> schemas -> GitSource -> properties -> git_url -> required
value is not a valid list (type=type_error.list)
- Manually update the offenders'
required
frombool
tolist
, e.g.
required: false
to
required:
- false
- Rerun
openapi-python-client generate --path jobs-2.1-aws.yaml
- Results in multiple warnings:
WARNING parsing POST /2.1/jobs/create within default. Endpoint will not be generated.
Cannot take allOf a non-object
WARNING parsing POST /2.1/jobs/run-now within default. Endpoint will not be generated.
Cannot take allOf a non-object
Expected behavior
A clear and concise description of what you expected to happen.
No warnings; succesful generation. I am happy to help contribute a PR if this is indeed a bug and if we can figure out the issue.
OpenAPI Spec File
A link to your openapi.json which produces this issue.
https://docs.databricks.com/_static/api-refs/jobs-2.1-aws.yaml (needs manual modification to the yaml to make it more compliant)
Desktop (please complete the following information):
- OS: Mac M1
- Python Version: 3.9.13
- openapi-python-client version 0.11.6
Additional context
Add any other context about the problem here.