Skip to content

Commit d1b0ff7

Browse files
committed
Remove obsolete configuration files and restructure OpenAPI documentation
1 parent 1483ac5 commit d1b0ff7

29 files changed

+501
-1291
lines changed

.redocly.yaml

-14
This file was deleted.

README.md

+102-250
Original file line numberDiff line numberDiff line change
@@ -1,250 +1,102 @@
1-
# NFT OpenAPI Definition
2-
3-
## Working on your OpenAPI Definition
4-
5-
### Install
6-
7-
1. Install [Node JS](https://nodejs.org/).
8-
2. Clone this repo and run `npm install` in the repo root.
9-
10-
### Usage
11-
12-
#### `npm start`
13-
Starts the reference docs preview server.
14-
15-
#### `npm run build`
16-
Bundles the definition to the dist folder.
17-
18-
#### `npm test`
19-
Validates the definition.
20-
21-
## Contribution Guide
22-
23-
Below is a sample contribution guide. The tools
24-
in the repository don't restrict you to any
25-
specific structure. Adjust the contribution guide
26-
to match your own structure. However, if you
27-
don't have a structure in mind, this is a
28-
good place to start.
29-
30-
Update this contribution guide if you
31-
adjust the file/folder organization.
32-
33-
The `.redocly.yaml` controls settings for various
34-
tools including the lint tool and the reference
35-
docs engine. Open it to find examples and
36-
[read the docs](https://redoc.ly/docs/cli/configuration/)
37-
for more information.
38-
39-
40-
### Schemas
41-
42-
#### Adding Schemas
43-
44-
1. Navigate to the `openapi/components/schemas` folder.
45-
2. Add a file named as you wish to name the schema.
46-
3. Define the schema.
47-
4. Refer to the schema using the `$ref` (see example below).
48-
49-
##### Example Schema
50-
This is a very simple schema example:
51-
```yaml
52-
type: string
53-
description: The resource ID. Defaults to UUID v4
54-
maxLength: 50
55-
example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
56-
```
57-
This is a more complex schema example:
58-
```yaml
59-
type: object
60-
properties:
61-
id:
62-
description: The customer identifier string
63-
readOnly: true
64-
allOf:
65-
- $ref: ./ResourceId.yaml
66-
websiteId:
67-
description: The website's ID
68-
allOf:
69-
- $ref: ./ResourceId.yaml
70-
paymentToken:
71-
type: string
72-
writeOnly: true
73-
description: |
74-
A write-only payment token; if supplied, it will be converted into a
75-
payment instrument and be set as the `defaultPaymentInstrument`. The
76-
value of this property will override the `defaultPaymentInstrument`
77-
in the case that both are supplied. The token may only be used once
78-
before it is expired.
79-
defaultPaymentInstrument:
80-
$ref: ./PaymentInstrument.yaml
81-
createdTime:
82-
description: The customer created time
83-
allOf:
84-
- $ref: ./ServerTimestamp.yaml
85-
updatedTime:
86-
description: The customer updated time
87-
allOf:
88-
- $ref: ./ServerTimestamp.yaml
89-
tags:
90-
description: A list of customer's tags
91-
readOnly: true
92-
type: array
93-
items:
94-
$ref: ./Tags/Tag.yaml
95-
revision:
96-
description: >
97-
The number of times the customer data has been modified.
98-
99-
The revision is useful when analyzing webhook data to determine if the
100-
change takes precedence over the current representation.
101-
type: integer
102-
readOnly: true
103-
_links:
104-
type: array
105-
description: The links related to resource
106-
readOnly: true
107-
minItems: 3
108-
items:
109-
anyOf:
110-
- $ref: ./Links/SelfLink.yaml
111-
- $ref: ./Links/NotesLink.yaml
112-
- $ref: ./Links/DefaultPaymentInstrumentLink.yaml
113-
- $ref: ./Links/LeadSourceLink.yaml
114-
- $ref: ./Links/WebsiteLink.yaml
115-
_embedded:
116-
type: array
117-
description: >-
118-
Any embedded objects available that are requested by the `expand`
119-
querystring parameter.
120-
readOnly: true
121-
minItems: 1
122-
items:
123-
anyOf:
124-
- $ref: ./Embeds/LeadSourceEmbed.yaml
125-
126-
```
127-
128-
##### Using the `$ref`
129-
130-
Notice in the complex example above the schema definition itself has `$ref` links to other schemas defined.
131-
132-
Here is a small excerpt with an example:
133-
134-
```yaml
135-
defaultPaymentInstrument:
136-
$ref: ./PaymentInstrument.yaml
137-
```
138-
139-
The value of the `$ref` is the path to the other schema definition.
140-
141-
You may use `$ref`s to compose schema from other existing schema to avoid duplication.
142-
143-
You will use `$ref`s to reference schema from your path definitions.
144-
145-
#### Editing Schemas
146-
147-
1. Navigate to the `openapi/components/schemas` folder.
148-
2. Open the file you wish to edit.
149-
3. Edit.
150-
151-
### Paths
152-
153-
#### Adding a Path
154-
155-
1. Navigate to the `openapi/paths` folder.
156-
2. Add a new YAML file named like your URL endpoint except replacing `/` with `@` and putting path parameters into curly braces like `{example}`.
157-
3. Add the path and a ref to it inside of your `openapi.yaml` file inside of the `openapi` folder.
158-
159-
Example addition to the `openapi.yaml` file:
160-
```yaml
161-
'/customers/{id}':
162-
$ref: './paths/customers@{id}.yaml'
163-
```
164-
165-
Here is an example of a YAML file named `customers@{id}.yaml` in the `paths` folder:
166-
167-
```yaml
168-
get:
169-
tags:
170-
- Customers
171-
summary: Retrieve a list of customers
172-
operationId: GetCustomerCollection
173-
description: |
174-
You can have a markdown description here.
175-
parameters:
176-
- $ref: ../components/parameters/collectionLimit.yaml
177-
- $ref: ../components/parameters/collectionOffset.yaml
178-
- $ref: ../components/parameters/collectionFilter.yaml
179-
- $ref: ../components/parameters/collectionQuery.yaml
180-
- $ref: ../components/parameters/collectionExpand.yaml
181-
- $ref: ../components/parameters/collectionFields.yaml
182-
responses:
183-
'200':
184-
description: A list of Customers was retrieved successfully
185-
headers:
186-
Rate-Limit-Limit:
187-
$ref: ../components/headers/Rate-Limit-Limit.yaml
188-
Rate-Limit-Remaining:
189-
$ref: ../components/headers/Rate-Limit-Remaining.yaml
190-
Rate-Limit-Reset:
191-
$ref: ../components/headers/Rate-Limit-Reset.yaml
192-
Pagination-Total:
193-
$ref: ../components/headers/Pagination-Total.yaml
194-
Pagination-Limit:
195-
$ref: ../components/headers/Pagination-Limit.yaml
196-
Pagination-Offset:
197-
$ref: ../components/headers/Pagination-Offset.yaml
198-
content:
199-
application/json:
200-
schema:
201-
type: array
202-
items:
203-
$ref: ../components/schemas/Customer.yaml
204-
text/csv:
205-
schema:
206-
type: array
207-
items:
208-
$ref: ../components/schemas/Customer.yaml
209-
'401':
210-
$ref: ../components/responses/AccessForbidden.yaml
211-
x-code-samples:
212-
- lang: PHP
213-
source:
214-
$ref: ../code_samples/PHP/customers/get.php
215-
post:
216-
tags:
217-
- Customers
218-
summary: Create a customer (without an ID)
219-
operationId: PostCustomer
220-
description: Another markdown description here.
221-
requestBody:
222-
$ref: ../components/requestBodies/Customer.yaml
223-
responses:
224-
'201':
225-
$ref: ../components/responses/Customer.yaml
226-
'401':
227-
$ref: ../components/responses/AccessForbidden.yaml
228-
'409':
229-
$ref: ../components/responses/Conflict.yaml
230-
'422':
231-
$ref: ../components/responses/InvalidDataError.yaml
232-
x-code-samples:
233-
- lang: PHP
234-
source:
235-
$ref: ../code_samples/PHP/customers/post.php
236-
```
237-
238-
You'll see extensive usage of `$ref`s in this example to different types of components including schemas.
239-
240-
You'll also notice `$ref`s to code samples.
241-
242-
### Code samples
243-
244-
1. Navigate to the `openapi/code_samples` folder.
245-
2. Navigate to the `<language>` (e.g. PHP) sub-folder.
246-
3. Navigate to the `path` folder, and add ref to the code sample.
247-
248-
You can add languages by adding new folders at the appropriate path level.
249-
250-
More details inside the `code_samples` folder README.
1+
# **Projeto NFT Python Floripa**
2+
3+
## Resumo do Projeto
4+
5+
O projeto de NFT da comunidade Python Floripa visa desenvolver uma plataforma colaborativa para criar, resgatar e validar NFTs, com foco na capacitação dos membros da comunidade e na aplicação prática de tecnologias blockchain. A ferramenta será utilizada inicialmente pela comunidade Python Floripa, porém estará aberta a outras comunidades e organizações públicas e privadas, permitindo a difusão de NFTs e blockchain de forma acessível e prática.
6+
7+
## Objetivos Principais
8+
9+
1. **Capacitação dos membros:** Criar oportunidades para que desenvolvedores da comunidade Python Floripa aprendam e implementem soluções blockchain.
10+
11+
2. **Conteúdo de referência:** Produzir documentação e conteúdo que sirvam como referência para a comunidade em geral.
12+
13+
3. **Plataforma de NFTs:** Desenvolver uma plataforma de ponta a ponta que integre um provedor de blockchain, como Ethereum, para permitir o cadastro, resgate e validação de NFTs.
14+
15+
4. **Aplicações práticas:** Criar soluções práticas como:
16+
* Certificados de participação em eventos, gerados automaticamente com base no check-in dos participantes.
17+
* NFTs de cards para eventos e palestras, permitindo que participantes resgatem NFTs personalizados com base na sua presença.
18+
19+
**Certificado de Participação via NFT**: Cada participante que fizer check-in em um evento da Python Floripa poderá resgatar um NFT como certificado digital, garantindo a autenticidade de sua participação.
20+
**Cards NFT para eventos e palestras**: Cada evento ou atividade da comunidade terá um card digital vinculado a um NFT, que poderá ser resgatado por participantes após validação do check-in.
21+
**Popularização da Blockchain**: Facilitar a compreensão e utilização da tecnologia blockchain por parte da comunidade e da sociedade em geral, aproximando os desenvolvedores da prática e fomentando a difusão desse conhecimento.
22+
23+
## Objetivos Específicos
24+
25+
1. **Ferramenta para várias comunidades:** A plataforma será disponibilizada publicamente e poderá ser utilizada por outras comunidades interessadas, mediante a compra de créditos para cobrir os custos de infraestrutura, como o pagamento ao provedor de blockchain.
26+
27+
2. **Desenvolvimento colaborativo:** Todo o código-fonte será desenvolvido de forma colaborativa e aberto no GitHub da comunidade Python Floripa.
28+
29+
3. **Construção de autoridade:** Participantes diretos do desenvolvimento poderão adicionar suas contribuições ao projeto em seus portfólios, destacando sua participação para fins de progressão profissional.
30+
31+
4. **Documentação e Live Weeklys:** O desenvolvimento será documentado e acompanhado por transmissões semanais ao vivo entre os membros do squad de desenvolvimento, para discutir a evolução, distribuir demandas e relatar a evolução do projeto. Essas lives serão disponibilizadas no YouTube da comunidade.
32+
33+
## Especificação Técnica
34+
35+
### Estrutura da Plataforma
36+
37+
1. **Backend:** A plataforma será desenvolvida em Python, com integração a um provedor de blockchain (e.g., Ethereum). Será responsável por:
38+
* Gerenciar o cadastro dos eventos e usuários.
39+
* Verificar o check-in dos participantes nos eventos.
40+
* Emitir e associar NFTs aos participantes.
41+
42+
2. **Frontend:** Interface simples e amigável para permitir que os usuários façam o resgate dos NFTs gerados. O design será responsivo, permitindo fácil acesso em diferentes dispositivos.
43+
44+
3. **Integração com Blockchain:** A plataforma terá integração com o blockchain escolhido (e.g., Ethereum) para a criação e validação dos NFTs. Utilizaremos smart contracts para garantir a segurança e transparência das transações.
45+
46+
4. **Banco de Dados:** Sistema de banco de dados para armazenar os eventos, usuários, e NFTs gerados, garantindo a rastreabilidade e segurança dos dados.
47+
48+
### Cronograma e Marcos do Projeto
49+
50+
1. **Planejamento e Design** (prazo?):
51+
* Definir os requisitos detalhados.
52+
* Estruturar o backend e a integração com o blockchain.
53+
* Prototipar a interface.
54+
55+
2. **Desenvolvimento** (prazo?):
56+
* Implementação do backend e frontend.
57+
* Configuração da integração com o blockchain.
58+
* Testes iniciais com a comunidade.
59+
* Publicar documentação no GitHub.
60+
61+
3. **Lançamento Beta** (prazo?):
62+
* Disponibilizar a versão beta da plataforma para testes com os membros da comunidade.
63+
64+
4. **Ajustes e Lançamento** (prazo?):
65+
* Correção e ajustes de código.
66+
* Realizar lives de apresentação da solução.
67+
* Recrutar embaixadores para divulgar o projeto em eventos diversos.
68+
* Divulgação nas redes sociais e eventos da comunidade.
69+
70+
## Referencias
71+
72+
**Benchmark**
73+
[https://poap.xyz/](https://poap.xyz/)
74+
75+
**Ferramentas para Desenhar Arquitetura**
76+
draw.io
77+
[https://structurizr.com](https://structurizr.com/)
78+
79+
## Comentários e Devaneios
80+
81+
## Requisitos funcionais
82+
83+
- Usuário
84+
85+
- Eventos
86+
- tipos de usuários:
87+
- admin
88+
- apoio
89+
- palestrante
90+
- participante
91+
- check-in
92+
- self service?
93+
94+
- Atividade
95+
- check in
96+
- QR code no meio da atividade
97+
98+
- Certificados
99+
- certifica que participou das atividades do Eventos
100+
101+
## Requisitos não-funcionais
102+
- deploy na AWS (?)

docs/.redocly.yaml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# See https://redoc.ly/docs/cli/configuration/ for more information.
2+
extends:
3+
- recommended
4+
apis:
5+
core@v1:
6+
root: ./openapi/openapi.yaml
7+
rules:
8+
no-ambiguous-paths: error
9+
theme:
10+
openapi:
11+
hideLogo: false
12+
decorators:
13+
remove-x-internal: on
14+
rules:
15+
no-unused-components: error
16+
operation-singular-tag: warn
17+
boolean-parameter-prefixes:
18+
severity: error
19+
prefixes: ["can", "is", "has"]
20+
theme:
21+
openapi:
22+
schemaExpansionLevel: 2
23+
generateCodeSamples:
24+
languages:
25+
- lang: curl
26+
- lang: Python

0 commit comments

Comments
 (0)