Skip to content

Commit

Permalink
docs(openapi): improve description fields (datahub-project#9690)
Browse files Browse the repository at this point in the history
  • Loading branch information
dim-ops authored Jan 24, 2024
1 parent 2f36817 commit 7ae88d9
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions metadata-ingestion/src/datahub/ingestion/source/openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,37 @@


class OpenApiConfig(ConfigModel):
name: str = Field(description="")
url: str = Field(description="")
swagger_file: str = Field(description="")
ignore_endpoints: list = Field(default=[], description="")
username: str = Field(default="", description="")
password: str = Field(default="", description="")
name: str = Field(description="Name of ingestion.")
url: str = Field(description="Endpoint URL. e.g. https://example.com")
swagger_file: str = Field(
description="Route for access to the swagger file. e.g. openapi.json"
)
ignore_endpoints: list = Field(
default=[], description="List of endpoints to ignore during ingestion."
)
username: str = Field(
default="", description="Username used for basic HTTP authentication."
)
password: str = Field(
default="", description="Password used for basic HTTP authentication."
)
proxies: Optional[dict] = Field(
default=None,
description="Eg. "
"`{'http': 'http://10.10.1.10:3128', 'https': 'http://10.10.1.10:1080'}`."
"If authentication is required, add it to the proxy url directly e.g. "
"`http://user:pass@10.10.1.10:3128/`.",
)
forced_examples: dict = Field(default={}, description="")
token: Optional[str] = Field(default=None, description="")
get_token: dict = Field(default={}, description="")
forced_examples: dict = Field(
default={},
description="If no example is provided for a route, it is possible to create one using forced_example.",
)
token: Optional[str] = Field(
default=None, description="Token for endpoint authentication."
)
get_token: dict = Field(
default={}, description="Retrieving a token from the endpoint."
)

def get_swagger(self) -> Dict:
if self.get_token or self.token is not None:
Expand Down

0 comments on commit 7ae88d9

Please sign in to comment.