Hi! I’ve been working on an OpenAPI integration on...
# troubleshoot
b
Hi! I’ve been working on an OpenAPI integration on v0.9.5. Looking at the raw OpenAPI Json Schema, I’ve noticed some OneOf schemas which seem to be missing the
OneOf
Copy code
"OneOfSchemaMetadataPlatformSchema":
{
    "required":
    [
        "__type"
    ],
    "type": "object",
    "properties":
    {
        "__type":
        {
            "type": "string"
        }
    },
    "description": "The native schema in the dataset's platform.",
    "discriminator":
    {
        "propertyName": "__type"
    }
},
It seems like this is missing a OneOf — I see in the Golden Test Data that this is actually a nested structure, with no “__type” field. I see the same for a bunch of other OneOf types like
OneOfSchemaFieldDataTypeType
. Checked out the YAML schema and it’s the same. Am I supposed to be instantiating these somehow, or should I be sending raw json in “__type” or?
a
Hi Asa, could you describe your usecase here? If it isn’t covered in https://datahubproject.io/docs/generated/ingestion/sources/openapi, I could see if the team has any advice
b
Just trying to ingest metadata — specifically datasets, via the
schemaMetadata
aspect which requires the
PlatformSchema
field.
I’ve started shimming the generated json, but it’s pretty gross, so would be happy to learn that there’s another way
a
I’ll ask and get back to you- good to know you’ve found a workaround for now!
b
Much appreciated! Hopefully I’m just doing something wrong 😁
m
@best-eve-12546 are you writing this code in Python or a different language?
b
GoLang, or else I’d definitely just use the SDK 🙂
m
Got it, I don't know the answer to your question OTOH right now.
b
No problem, thanks anyway 👍