Skip to content

Commit

Permalink
Add the /manifest_template endpoint to return a string representation…
Browse files Browse the repository at this point in the history
… of the manifest template (#19367)

* return a string representation of the manifest template

* get rid of extra template

* add a comment
  • Loading branch information
brianjlai authored Nov 14, 2022
1 parent 1c961f4 commit b52caa0
Showing 1 changed file with 50 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,56 @@

class DefaultApiImpl(DefaultApi):
async def get_manifest_template(self) -> str:
return "Hello World"
return """version: "0.1.0"
definitions:
selector:
extractor:
field_pointer: []
requester:
url_base: "https://example.com"
http_method: "GET"
authenticator:
type: BearerAuthenticator
api_token: "{{ config['api_key'] }}"
retriever:
record_selector:
$ref: "*ref(definitions.selector)"
paginator:
type: NoPagination
requester:
$ref: "*ref(definitions.requester)"
base_stream:
retriever:
$ref: "*ref(definitions.retriever)"
customers_stream:
$ref: "*ref(definitions.base_stream)"
$options:
name: "customers"
primary_key: "id"
path: "/example"
streams:
- "*ref(definitions.customers_stream)"
check:
stream_names:
- "customers"
spec:
documentation_url: https://docsurl.com
connection_specification:
title: Source Name Spec # 'TODO: Replace this with the name of your source.'
type: object
required:
- api_key
additionalProperties: true
properties:
# 'TODO: This schema defines the configuration required for the source. This usually involves metadata such as database and/or authentication information.':
api_key:
type: string
description: API Key
"""

async def list_streams(self, streams_list_request_body: StreamsListRequestBody = Body(None, description="")) -> StreamsListRead:
raise Exception("not yet implemented")
Expand Down

0 comments on commit b52caa0

Please sign in to comment.