Swagger-style Thing Description viewer

Aberta
#428 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 3 dias

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
22/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
fastapi, node.js, python

Direção de pesquisa

Start by reading the Thing Description document a running LabThings server exposes, since the issue names it as the only interface between the viewer and the server, and compare it with the current Swagger output. Survey existing Thing Description tooling (the WoT node library is mentioned) before deciding whether to build a single-page app. Done means one page per Thing, each property and action listed once, with invoke/read/write working against a live server; the issue leaves repo placement and scope open, so expect a design discussion first.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

enhancement good first issue help wanted

Is your feature request related to a problem? Please describe.

The Swagger docs are very long, because an Affordance (Property/Action) corresponds to potentially quite a few endpoints. There are some improvements to the API that might make this problem worse. Trawling through Swagger is a pain, and additionally it's not very nice to use, because there's a lot of irrelevant/duplicated information.

Describe the solution you'd like

It would be fantastic to have an interactive documentation page based on the Thing Description, with a page per Thing. That way, each property or action gets exactly one entry, and it's neatly organised by Thing. Ideally, because this is served from a live LabThings server, you'd even be able to invoke actions and read/write properties. Things like polling for completion of an invocation are a pain to do from Swagger, but would be really easy to add to a custom web app.

This would make quite a nice self-contained little project, perhaps even a separate repo that builds a single page web app that we can bundle into the LabThings server. The interface between this and the rest of LabThings is the Thing Description document, so it's already pretty well defined.

Describe alternatives you've considered
I have briefy played with the WoT node library, but not for quite a while. It would be worth doing a survey of Thing Description tools before coding our own from scratch, though I think LabThings is probably enough of an edge case that we are likely to end up rolling our own to some degree.

Linguagem predominante
Python
Estrelas
10
Forks
4
Merge médio
4d 15h
PRs com merge (30d)
11

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de labthings/labthings-fastapi

Todas as issues de labthings/labthings-fastapi

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.