flexget.api.core.schema module#

class flexget.api.core.schema.SchemaAPI(api, *args, **kwargs)[source]#

Bases: APIResource

Parameters:

api (RestxAPI)

get(path, session=None)[source]#

Get schema definition.

Parameters:
Return type:

Response

mediatypes()#
endpoint = 'schema_schema_api'#
methods: ClassVar[Collection[str] | None] = {'GET'}#

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

class flexget.api.core.schema.SchemaAllAPI(api, *args, **kwargs)[source]#

Bases: APIResource

Parameters:

api (RestxAPI)

get(session=None)[source]#

List all schema definitions.

Parameters:

session (Session)

Return type:

Response

mediatypes()#
endpoint = 'schema_schema_all_api'#
methods: ClassVar[Collection[str] | None] = {'GET'}#

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

flexget.api.core.schema.rewrite_ref(identifier, base_url)[source]#

Rewrite all arbitrary refs in the schemas to be real urls servable by this endpoint.

The refs in the schemas are arbitrary identifiers, and cannot be used as-is as real network locations.

Parameters:
  • identifier (str)

  • base_url (str)

Return type:

str

flexget.api.core.schema.rewrite_refs(schema, base_url)[source]#

Make sure any $refs in the schema point properly back to this endpoint.

Parameters:

base_url (str)