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

$ref resolver generates unreachable object keys #7169

Closed
monai opened this issue Oct 19, 2021 · 1 comment
Closed

$ref resolver generates unreachable object keys #7169

monai opened this issue Oct 19, 2021 · 1 comment
Labels
area/connectors Connector related issues CDK Connector Development Kit community type/bug Something isn't working

Comments

@monai
Copy link
Contributor

monai commented Oct 19, 2021

Enviroment

  • Airbyte version: example is 0.30.20-alpha
  • OS Version / Instance: macOS
  • Deployment: Docker
  • Severity: Very Low
  • Step where error happened: Development

Current Behavior

JSON schema $ref resolver naively takes supplied $ref value and uses it as a verbatim definition key, including forward slashes. However, in JSON schema, forward slash denotes access of object key; therefore, such definitions are unreachable.

Expected Behavior

Forward slashes in definition keys should be replaced with safe character, i.e., dash or underscore.

I'm developing a connector for a web service with highly nested data structures, and I want to have JSON schemas mirroring the model structure of that service.

Logs

Schema excerpt

Files:

  • schemas/some_stream.json
  • schemas/shared/nested/model/another_schema.json
{
  "name": "some_stream",
  "json_schema": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "object",
    "properties": {
      "field": {
        "$ref": "#/definitions/nested/model/another_schema_"
      }
    },
    "definitions": {
      "nested/model/another_schema_": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "another_field": {
            "type": "string"
          }
        }
      }
    }
  }
}
@monai monai added the type/bug Something isn't working label Oct 19, 2021
@marcosmarxm marcosmarxm added the CDK Connector Development Kit label Oct 22, 2021
@sherifnada sherifnada added the area/connectors Connector related issues label Nov 15, 2021
@sherifnada
Copy link
Contributor

I believe this was recently fixed in #7734 -- could you reopen this issue if it still persists?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues CDK Connector Development Kit community type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants