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

docs: provide schemas useful for frontend development #94

Merged
merged 1 commit into from
Sep 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/openapi/_index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ info:
description: App to Create Graphically-Summarized Notes in Three Steps
paths:
$ref: ./paths/_index.yaml
components:
schemas:
$ref: ./schemas/_index.yaml
9 changes: 9 additions & 0 deletions docs/openapi/schemas/_index.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# List of unused schemas. These are not used in API definitions but useful for frontend development.
PaperWithoutAutofield:
$ref: ./entity/paper/PaperWithoutAutofield.yaml
PaperWithoutAutofieldError:
$ref: ./entity/paper/PaperWithoutAutofieldError.yaml
GraphContentWithoutAutofield:
$ref: ./entity/graph/GraphContentWithoutAutofield.yaml
GraphContentWithoutAutofieldError:
$ref: ./entity/graph/GraphContentWithoutAutofieldError.yaml
1 change: 0 additions & 1 deletion docs/openapi/schemas/entity/graph/GraphContent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ properties:
This is the introduction of the paper.
required:
- id
- name
- paragraph
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
type: object
description: Graph object with only content fields without auto-generated fields
properties:
paragraph:
type: string
maxLength: 40000
description: Graph paragraph
example: |
## Introduction
This is the introduction of the paper.
required:
- paragraph
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
type: object
description: Error Message for GraphContentWithoutAutofield object
properties:
paragraph:
type: string
description: Error message for graph paragraph
example: graph paragraph must be less than or equal to 40000 bytes
15 changes: 15 additions & 0 deletions docs/openapi/schemas/entity/paper/PaperWithoutAutofield.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
type: object
description: Paper object without auto-generated fields
properties:
content:
type: string
maxLength: 40000
description: Paper content
example: |
## Introduction
This is the introduction of the paper.

## What is note apps?
Note apps is a web application that allows users to create, read, update, and delete notes.
required:
- content
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
type: object
description: Error Message for PaperWithoutAutofield object
properties:
content:
type: string
description: Error message for paper content
example: paper content must be less than or equal to 40000 bytes
17 changes: 17 additions & 0 deletions internal/model/model_graph_content_without_autofield.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Web API of kNODEledge
*
* App to Create Graphically-Summarized Notes in Three Steps
*
* API version: 0.1.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/

package model

// GraphContentWithoutAutofield - Graph object with only content fields without auto-generated fields
type GraphContentWithoutAutofield struct {

// Graph paragraph
Paragraph string `json:"paragraph"`
}
17 changes: 17 additions & 0 deletions internal/model/model_graph_content_without_autofield_error.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Web API of kNODEledge
*
* App to Create Graphically-Summarized Notes in Three Steps
*
* API version: 0.1.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/

package model

// GraphContentWithoutAutofieldError - Error Message for GraphContentWithoutAutofield object
type GraphContentWithoutAutofieldError struct {

// Error message for graph paragraph
Paragraph string `json:"paragraph,omitempty"`
}
17 changes: 17 additions & 0 deletions internal/model/model_paper_without_autofield.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Web API of kNODEledge
*
* App to Create Graphically-Summarized Notes in Three Steps
*
* API version: 0.1.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/

package model

// PaperWithoutAutofield - Paper object without auto-generated fields
type PaperWithoutAutofield struct {

// Paper content
Content string `json:"content"`
}
17 changes: 17 additions & 0 deletions internal/model/model_paper_without_autofield_error.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Web API of kNODEledge
*
* App to Create Graphically-Summarized Notes in Three Steps
*
* API version: 0.1.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/

package model

// PaperWithoutAutofieldError - Error Message for PaperWithoutAutofield object
type PaperWithoutAutofieldError struct {

// Error message for paper content
Content string `json:"content,omitempty"`
}
Loading