From 287917d61929cd5f8537a3f541dde7b0b92860da Mon Sep 17 00:00:00 2001 From: sagar-salvi-apptware Date: Wed, 24 Jul 2024 18:32:35 +0530 Subject: [PATCH] fix(connector/openapi): update recipe for DataHub OpenAPI with url_complement and bearer token --- .../docs/sources/openapi/openapi_recipe.yml | 2 +- .../openapi/openapi_recipe_bearer_token.yml | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 metadata-ingestion/docs/sources/openapi/openapi_recipe_bearer_token.yml diff --git a/metadata-ingestion/docs/sources/openapi/openapi_recipe.yml b/metadata-ingestion/docs/sources/openapi/openapi_recipe.yml index 07c08a814a7b1..63615dcb188e1 100644 --- a/metadata-ingestion/docs/sources/openapi/openapi_recipe.yml +++ b/metadata-ingestion/docs/sources/openapi/openapi_recipe.yml @@ -6,7 +6,7 @@ source: swagger_file: classicapi/doc/swagger.json # where to search for the OpenApi definitions get_token: # optional, if you need to get an authentication token beforehand request_type: get - url: api/authentication/login?username={username}&password={password} + url_complement: api/authentication/login?username={username}&password={password} username: your_username # optional password: your_password # optional forced_examples: # optionals diff --git a/metadata-ingestion/docs/sources/openapi/openapi_recipe_bearer_token.yml b/metadata-ingestion/docs/sources/openapi/openapi_recipe_bearer_token.yml new file mode 100644 index 0000000000000..218e54f1dcfba --- /dev/null +++ b/metadata-ingestion/docs/sources/openapi/openapi_recipe_bearer_token.yml @@ -0,0 +1,18 @@ +source: + type: openapi + config: + name: test_endpoint # this name will appear in DatHub + url: https://example.com/gms/ + swagger_file: classicapi/doc/swagger.json # where to search for the OpenApi definitions + bearer_token: "" # bearer token + + # optionals + forced_examples: + /accounts/groupname/{name}: ['test'] + /accounts/username/{name}: ['test'] + ignore_endpoints: [/ignore/this, /ignore/that, /also/that_other] + +sink: + type: "datahub-rest" + config: + server: 'http://localhost:8080' \ No newline at end of file