Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discrepancy in documentation for resource templates #68

Closed
maledorak opened this issue Nov 25, 2024 · 1 comment · Fixed by #77
Closed

Discrepancy in documentation for resource templates #68

maledorak opened this issue Nov 25, 2024 · 1 comment · Fixed by #77
Assignees
Labels
bug Something isn't working

Comments

@maledorak
Copy link

maledorak commented Nov 25, 2024

In 5th step of python sdk advanced features there is explanation how to use resource templates

@self.list_resources()
async def list_resources(self) -> ListResourcesResult:
    return ListResourcesResult(
        resources=[...],
        resourceTemplates=[
            ResourceTemplate(
                uriTemplate="weather://{city}/current",
                name="Current weather for any city",
                mimeType="application/json"
            )
        ]
    )

Which is wrong because ListResourcesResult does not accept resourceTemplates
ListResourcesResult implementation

Also there is no option to use ListResourceTemplatesResult separately, because there is no Server.list_resource_templates in order to use it as decorator

@dsp-ant dsp-ant added the bug Something isn't working label Nov 27, 2024
@dsp-ant dsp-ant self-assigned this Nov 27, 2024
@dsp-ant
Copy link
Member

dsp-ant commented Nov 27, 2024

Thanks for reporting this! I'll prioritize this. It's clearly that the SDK is missing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants