-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add JSON Schema
Property
helpers for allowed_values
(enum
…
…) and `examples` (#1098) * chore: initial refactor for readability * feat: add Meltano rendering logic in private helper module * feat: add `secret=True` support in JSON Schema type helpers * change: update examples to use 'secret=True' for protected settings * chore: flake8 fix * add unit tests for type helpers * fix missing secret flag on unit test * chore: get tests passing * chore: add test for description * chore: remove commented code * chore: remove files related to #1094 * chore: revert --about updates * use constants for annotation keys * chore: bump validator to Draft7 * chore: add testing for is_secret_type * chore: add tests * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * chore: more tests * docs: add info to FAQ * chore: add test for integer type * feat: add `allowed_values` and `examples` to Property class * chore: add tests and samples * chore: fix missing typing import * docs: updated usage examples in typing module ref Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
6cdb0fd
commit 6607487
Showing
4 changed files
with
42 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,9 @@ class SampleTapGoogleAnalytics(Tap): | |
name: str = "sample-tap-google-analytics" | ||
config_jsonschema = PropertiesList( | ||
Property("view_id", StringType(), required=True), | ||
Property("client_email", StringType(), required=True), | ||
Property( | ||
"client_email", StringType(), required=True, examples=["[email protected]"] | ||
), | ||
Property("private_key", StringType(), required=True, secret=True), | ||
).to_dict() | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters