1
0
Fork 0
mirror of https://github.com/anyproto/anytype-heart.git synced 2025-06-08 05:47:07 +09:00

GO-5589: Update operation IDs to use snake_case format in openapi spec

This commit is contained in:
Jannis Metrikat 2025-05-13 18:31:01 +02:00
parent a6935338b8
commit 81f858d1fe
No known key found for this signature in database
GPG key ID: B223CAC5AAF85615
13 changed files with 75 additions and 75 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1453,7 +1453,7 @@ paths:
ID must then be used with the token endpoint (see below) to solve the challenge
and retrieve an authentication token. This mechanism ensures that only trusted
applications and authorized users gain access.
operationId: createAuthChallenge
operationId: create_auth_challenge
parameters:
- description: The version of the API to use
in: header
@ -1504,7 +1504,7 @@ paths:
app key. This endpoint is central to the authentication process, as it validates
the user's identity and issues a token that can be used for further interactions
with the API.
operationId: solveAuthChallenge
operationId: solve_auth_challenge
parameters:
- description: The version of the API to use
in: header
@ -1561,7 +1561,7 @@ paths:
by last updated timestamp). Pagination is controlled via `offset` and `limit`
query parameters to facilitate lazy loading in client UIs. The response returns
a unified list of matched objects with their metadata and properties.'
operationId: searchGlobal
operationId: search_global
parameters:
- description: The version of the API to use
in: header
@ -1621,7 +1621,7 @@ paths:
the authenticated user. Each space record contains detailed information such
as the space ID, name, icon (derived either from an emoji or image URL), and
additional metadata. This endpoint is key to displaying a users workspaces.
operationId: listSpaces
operationId: list_spaces
parameters:
- description: The version of the API to use
in: header
@ -1675,7 +1675,7 @@ paths:
the workspace with default settings (for example, a default dashboard or home
page). On success, the new spaces full metadata is returned, enabling the
client to immediately switch context to the new internal.
operationId: createSpace
operationId: create_space
parameters:
- description: The version of the API to use
in: header
@ -1733,7 +1733,7 @@ paths:
ID. The response includes metadata such as the space name, icon, and various
workspace IDs (home, archive, profile, etc.). This detailed view supports
use cases such as displaying space-specific settings.
operationId: getSpace
operationId: get_space
parameters:
- description: The version of the API to use
in: header
@ -1783,7 +1783,7 @@ paths:
body should contain the new name and/or description in JSON format. This endpoint
is useful for renaming or rebranding a workspace without needing to recreate
it. The updated spaces metadata is returned in the response.
operationId: updateSpace
operationId: update_space
parameters:
- description: The version of the API to use
in: header
@ -1861,7 +1861,7 @@ paths:
that allow draganddrop or multiselect additions to collections, enabling
users to dynamically manage their collections without needing to modify the
underlying object data.
operationId: addListObjects
operationId: add_list_objects
parameters:
- description: The version of the API to use
in: header
@ -1939,7 +1939,7 @@ paths:
in a space. The endpoint takes the space, list, and object identifiers as
path parameters and is subject to rate limiting. It is used for dynamically
managing collections without affecting the underlying object data.
operationId: removeListObject
operationId: remove_list_object
parameters:
- description: The version of the API to use
in: header
@ -2016,7 +2016,7 @@ paths:
according to user preferences and context. This endpoint is essential for
applications that need to display lists in various formats (e.g., grid, table)
or with different sorting/filtering criteria.
operationId: getListViews
operationId: get_list_views
parameters:
- description: The version of the API to use
in: header
@ -2087,7 +2087,7 @@ paths:
no view ID is specified, all list objects are returned without filtering and
sorting. This endpoint helps clients to manage grouped objects (for example,
tasks within a list) by returning information for each item of the list.
operationId: getListObjects
operationId: get_list_objects
parameters:
- description: The version of the API to use
in: header
@ -2164,7 +2164,7 @@ paths:
(e.g. joining, active) and role (e.g. Viewer, Editor, Owner). This endpoint
supports collaborative features by allowing clients to show who is in a space
and manage access rights.
operationId: listMembers
operationId: list_members
parameters:
- description: The version of the API to use
in: header
@ -2225,7 +2225,7 @@ paths:
the member's ID (starting with `_participant`) or the member's identity.
This is useful for user profile pages, permission management, and displaying
member-specific information in collaborative environments.
operationId: getMember
operationId: get_member
parameters:
- description: The version of the API to use
in: header
@ -2284,7 +2284,7 @@ paths:
of the content (if applicable), layout, space ID, blocks and details. It is
intended for building views where users can see all objects in a space at
a glance.
operationId: listObjects
operationId: list_objects
parameters:
- description: The version of the API to use
in: header
@ -2346,7 +2346,7 @@ paths:
of object to create). Post-creation, additional operations (like setting featured
properties or fetching bookmark metadata) may occur. The endpoint then returns
the full object data, ready for further interactions.
operationId: createObject
operationId: create_object
parameters:
- description: The version of the API to use
in: header
@ -2411,7 +2411,7 @@ paths:
the objects details after it has been archived. Proper error handling is
in place for situations such as when the object isnt found or the deletion
cannot be performed because of permission issues.
operationId: deleteObject
operationId: delete_object
parameters:
- description: The version of the API to use
in: header
@ -2487,7 +2487,7 @@ paths:
text, files, properties and dataviews) and extra details (such as timestamps
and linked member information). This endpoint is essential when a client needs
to render or edit the full object view.
operationId: getObject
operationId: get_object
parameters:
- description: The version of the API to use
in: header
@ -2557,7 +2557,7 @@ paths:
using a JSON payload. The update process is subject to rate limiting. The
payload must include the details to be updated. The endpoint then returns
the full object data, ready for further interactions.
operationId: updateObject
operationId: update_object
parameters:
- description: The version of the API to use
in: header
@ -2640,7 +2640,7 @@ paths:
space. Each property record includes its unique identifier, name and format.
This information is essential for clients to understand the available properties
for filtering or creating objects.'
operationId: listProperties
operationId: list_properties
parameters:
- description: The version of the API to use
in: header
@ -2699,7 +2699,7 @@ paths:
The creation process is subject to rate limiting. The payload must include
property details such as the name and format. The endpoint then returns the
full property data, ready for further interactions.'
operationId: createProperty
operationId: create_property
parameters:
- description: The version of the API to use
in: header
@ -2765,7 +2765,7 @@ paths:
the propertys details after it has been archived. Proper error handling is
in place for situations such as when the property isnt found or the deletion
cannot be performed because of permission issues.'
operationId: deleteProperty
operationId: delete_property
parameters:
- description: The version of the API to use
in: header
@ -2841,7 +2841,7 @@ paths:
detailed view assists clients in showing property options to users and in
guiding the user interface (such as displaying appropriate input fields or
selection options).'
operationId: getProperty
operationId: get_property
parameters:
- description: The version of the API to use
in: header
@ -2904,7 +2904,7 @@ paths:
using a JSON payload. The update process is subject to rate limiting. The
payload must include the name to be updated. The endpoint then returns the
full property data, ready for further interactions.'
operationId: updateProperty
operationId: update_property
parameters:
- description: The version of the API to use
in: header
@ -2993,7 +2993,7 @@ paths:
name, and color. This information is essential for clients to display select
or multi-select options to users when they are creating or editing objects.
The endpoint also supports pagination through offset and limit parameters.
operationId: listTags
operationId: list_tags
parameters:
- description: The version of the API to use
in: header
@ -3051,7 +3051,7 @@ paths:
the tag's name and color. The response includes the tag's details such as
its ID, name, and color. This is useful for clients when users want to add
new tag options to a property.
operationId: createTag
operationId: create_tag
parameters:
- description: The version of the API to use
in: header
@ -3122,7 +3122,7 @@ paths:
tags details after it has been archived. Proper error handling is in place
for situations such as when the tag isnt found or the deletion cannot be
performed because of permission issues.
operationId: deleteTag
operationId: delete_tag
parameters:
- description: The version of the API to use
in: header
@ -3202,7 +3202,7 @@ paths:
is identified by its unique identifier within the specified space. The response
includes the tag's details such as its ID, name, and color. This is useful
for clients to display or when editing a specific tag option.
operationId: getTag
operationId: get_tag
parameters:
- description: The version of the API to use
in: header
@ -3272,7 +3272,7 @@ paths:
tag's name and color. The response includes the tag's details such as its
ID, name, and color. This is useful for clients when users want to edit existing
tags for a property.
operationId: updateTag
operationId: update_tag
parameters:
- description: The version of the API to use
in: header
@ -3368,7 +3368,7 @@ paths:
preferences. The search is limited to the provided space and returns a list
of objects that match the query. This allows clients to implement spacespecific
filtering without having to process extraneous results.
operationId: searchSpace
operationId: search_space
parameters:
- description: The version of the API to use
in: header
@ -3437,7 +3437,7 @@ paths:
for known types, e.g. 'page' for 'Page'. Clients use this information when
offering choices for object creation or for filtering objects by type through
search.
operationId: listTypes
operationId: list_types
parameters:
- description: The version of the API to use
in: header
@ -3495,7 +3495,7 @@ paths:
The creation process is subject to rate limiting. The payload must include
type details such as the name, icon, and layout. The endpoint then returns
the full type data, ready to be used for creating objects.
operationId: createType
operationId: create_type
parameters:
- description: The version of the API to use
in: header
@ -3560,7 +3560,7 @@ paths:
It returns the types details after it has been archived. Proper error handling
is in place for situations such as when the type isnt found or the deletion
cannot be performed because of permission issues.
operationId: deleteType
operationId: delete_type
parameters:
- description: The version of the API to use
in: header
@ -3635,7 +3635,7 @@ paths:
detailed view assists clients in understanding the expected structure and
style for objects of that type and in guiding the user interface (such as
displaying appropriate icons or layout hints).
operationId: getType
operationId: get_type
parameters:
- description: The version of the API to use
in: header
@ -3697,7 +3697,7 @@ paths:
space using a JSON payload. The update process is subject to rate limiting.
The payload must include the name and properties to be updated. The endpoint
then returns the full type data, ready for further interactions.
operationId: updateType
operationId: update_type
parameters:
- description: The version of the API to use
in: header
@ -3780,7 +3780,7 @@ paths:
structures for creating new objects. Each template record contains its identifier,
name, and icon, so that clients can offer users a selection of templates when
creating objects.
operationId: listTemplates
operationId: list_templates
parameters:
- description: The version of the API to use
in: header
@ -3845,7 +3845,7 @@ paths:
object type in a space. The response provides the templates identifier, name,
icon, and any other relevant metadata. This endpoint is useful when a client
needs to preview or apply a template to prefill object creation fields.
operationId: getTemplate
operationId: get_template
parameters:
- description: The version of the API to use
in: header

View file

@ -14,7 +14,7 @@ import (
//
// @Summary Start new challenge
// @Description Generates a one-time authentication challenge for granting API access to the user's vault. Upon providing a valid `app_name`, the server issues a unique `challenge_id` and displays a short code within the Anytype Desktop On success, the service returns a unique challenge ID. This challenge ID must then be used with the token endpoint (see below) to solve the challenge and retrieve an authentication token. This mechanism ensures that only trusted applications and authorized users gain access.
// @ID createAuthChallenge
// @ID create_auth_challenge
// @Tags Auth
// @Accept json
// @Produce json
@ -47,7 +47,7 @@ func DisplayCodeHandler(s *service.Service) gin.HandlerFunc {
//
// @Summary Solve challenge
// @Description After receiving a challenge ID from the display_code endpoint, the client calls this endpoint to provide the corresponding 4-digit code (also via a query parameter) along with the challenge ID. The endpoint verifies that the challenge solution is correct and, if it is, returns a permanent app key. This endpoint is central to the authentication process, as it validates the user's identity and issues a token that can be used for further interactions with the API.
// @ID solveAuthChallenge
// @ID solve_auth_challenge
// @Tags Auth
// @Accept json
// @Produce json

View file

@ -14,7 +14,7 @@ import (
//
// @Summary Get list views
// @Description Returns a paginated list of views defined for a specific list (query or collection) within a space. Each view includes details such as layout, applied filters, and sorting options, enabling clients to render the list according to user preferences and context. This endpoint is essential for applications that need to display lists in various formats (e.g., grid, table) or with different sorting/filtering criteria.
// @Id getListViews
// @Id get_list_views
// @Tags Lists
// @Produce json
// @Param Anytype-Version header string true "The version of the API to use" default(2025-05-20)
@ -55,7 +55,7 @@ func GetListViewsHandler(s *service.Service) gin.HandlerFunc {
//
// @Summary Get objects in list
// @Description Returns a paginated list of objects associated with a specific list (query or collection) within a space. When a view ID is provided, the objects are filtered and sorted according to the view's configuration. If no view ID is specified, all list objects are returned without filtering and sorting. This endpoint helps clients to manage grouped objects (for example, tasks within a list) by returning information for each item of the list.
// @Id getListObjects
// @Id get_list_objects
// @Tags Lists
// @Produce json
// @Param Anytype-Version header string true "The version of the API to use" default(2025-05-20)
@ -102,7 +102,7 @@ func GetObjectsInListHandler(s *service.Service) gin.HandlerFunc {
//
// @Summary Add objects to list
// @Description Adds one or more objects to a specific list (collection only) by submitting a JSON array of object IDs. Upon success, the endpoint returns a confirmation message. This endpoint is vital for building user interfaces that allow draganddrop or multiselect additions to collections, enabling users to dynamically manage their collections without needing to modify the underlying object data.
// @Id addListObjects
// @Id add_list_objects
// @Tags Lists
// @Accept json
// @Produce json
@ -149,7 +149,7 @@ func AddObjectsToListHandler(s *service.Service) gin.HandlerFunc {
//
// @Summary Remove object from list
// @Description Removes a given object from the specified list (collection only) in a space. The endpoint takes the space, list, and object identifiers as path parameters and is subject to rate limiting. It is used for dynamically managing collections without affecting the underlying object data.
// @Id removeListObject
// @Id remove_list_object
// @Tags Lists
// @Produce json
// @Param Anytype-Version header string true "The version of the API to use" default(2025-05-20)

View file

@ -15,7 +15,7 @@ import (
//
// @Summary List members
// @Description Returns a paginated list of members belonging to the specified space. Each member record includes the members profile ID, name, icon (which may be derived from an emoji or image), network identity, global name, status (e.g. joining, active) and role (e.g. Viewer, Editor, Owner). This endpoint supports collaborative features by allowing clients to show who is in a space and manage access rights.
// @Id listMembers
// @Id list_members
// @Tags Members
// @Produce json
// @Param Anytype-Version header string true "The version of the API to use" default(2025-05-20)
@ -52,7 +52,7 @@ func ListMembersHandler(s *service.Service) gin.HandlerFunc {
//
// @Summary Get member
// @Description Fetches detailed information about a single member within a space. The endpoint returns the members identifier, name, icon, identity, global name, status and role. The member_id path parameter can be provided as either the member's ID (starting with `_participant`) or the member's identity. This is useful for user profile pages, permission management, and displaying member-specific information in collaborative environments.
// @Id getMember
// @Id get_member
// @Tags Members
// @Produce json
// @Param Anytype-Version header string true "The version of the API to use" default(2025-05-20)
@ -90,7 +90,7 @@ func GetMemberHandler(s *service.Service) gin.HandlerFunc {
//
// @Summary Update member
// @Description Modifies a member's status and role in a space. Use this endpoint to approve a joining member by setting the status to `active` and specifying a role (`reader` or `writer`), reject a joining member by setting the status to `declined`, remove a member by setting the status to `removed`, or update an active member's role. This endpoint enables fine-grained control over member access and permissions.
// @Id updateMember
// @Id update_member
// @Tags Members
// @Accept json
// @Produce json

View file

@ -15,7 +15,7 @@ import (
//
// @Summary List objects
// @Description Retrieves a paginated list of objects in the given space. The endpoint takes query parameters for pagination (offset and limit) and returns detailed data about each object including its ID, name, icon, type information, a snippet of the content (if applicable), layout, space ID, blocks and details. It is intended for building views where users can see all objects in a space at a glance.
// @Id listObjects
// @Id list_objects
// @Tags Objects
// @Produce json
// @Param Anytype-Version header string true "The version of the API to use" default(2025-05-20)
@ -54,7 +54,7 @@ func ListObjectsHandler(s *service.Service) gin.HandlerFunc {
//
// @Summary Get object
// @Description Fetches the full details of a single object identified by the object ID within the specified space. The response includes not only basic metadata (ID, name, icon, type) but also the complete set of blocks (which may include text, files, properties and dataviews) and extra details (such as timestamps and linked member information). This endpoint is essential when a client needs to render or edit the full object view.
// @Id getObject
// @Id get_object
// @Tags Objects
// @Produce json
// @Param Anytype-Version header string true "The version of the API to use" default(2025-05-20)
@ -96,7 +96,7 @@ func GetObjectHandler(s *service.Service) gin.HandlerFunc {
//
// @Summary Create object
// @Description Creates a new object in the specified space using a JSON payload. The creation process is subject to rate limiting. The payload must include key details such as the object name, icon, description, body content (which may support Markdown), source URL (required for bookmark objects), template identifier, and the type_key (which is the non-unique identifier of the type of object to create). Post-creation, additional operations (like setting featured properties or fetching bookmark metadata) may occur. The endpoint then returns the full object data, ready for further interactions.
// @Id createObject
// @Id create_object
// @Tags Objects
// @Accept json
// @Produce json
@ -147,7 +147,7 @@ func CreateObjectHandler(s *service.Service) gin.HandlerFunc {
//
// @Summary Update object
// @Description This endpoint updates an existing object in the specified space using a JSON payload. The update process is subject to rate limiting. The payload must include the details to be updated. The endpoint then returns the full object data, ready for further interactions.
// @Id updateObject
// @Id update_object
// @Tags Objects
// @Accept json
// @Produce json
@ -199,7 +199,7 @@ func UpdateObjectHandler(s *service.Service) gin.HandlerFunc {
//
// @Summary Delete object
// @Description This endpoint “deletes” an object by marking it as archived. The deletion process is performed safely and is subject to rate limiting. It returns the objects details after it has been archived. Proper error handling is in place for situations such as when the object isnt found or the deletion cannot be performed because of permission issues.
// @Id deleteObject
// @Id delete_object
// @Tags Objects
// @Produce json
// @Param Anytype-Version header string true "The version of the API to use" default(2025-05-20)

View file

@ -15,7 +15,7 @@ import (
//
// @Summary List properties
// @Description ⚠ Warning: Properties are experimental and may change in the next update. ⚠ Retrieves a paginated list of properties available within a specific space. Each property record includes its unique identifier, name and format. This information is essential for clients to understand the available properties for filtering or creating objects.
// @Id listProperties
// @Id list_properties
// @Tags Properties
// @Produce json
// @Param Anytype-Version header string true "The version of the API to use" default(2025-05-20)
@ -52,7 +52,7 @@ func ListPropertiesHandler(s *service.Service) gin.HandlerFunc {
//
// @Summary Get property
// @Description ⚠ Warning: Properties are experimental and may change in the next update. ⚠ Fetches detailed information about one specific property by its ID. This includes the propertys unique identifier, name and format. This detailed view assists clients in showing property options to users and in guiding the user interface (such as displaying appropriate input fields or selection options).
// @Id getProperty
// @Id get_property
// @Tags Properties
// @Produce json
// @Param Anytype-Version header string true "The version of the API to use" default(2025-05-20)
@ -91,7 +91,7 @@ func GetPropertyHandler(s *service.Service) gin.HandlerFunc {
//
// @Summary Create property
// @Description ⚠ Warning: Properties are experimental and may change in the next update. ⚠ Creates a new property in the specified space using a JSON payload. The creation process is subject to rate limiting. The payload must include property details such as the name and format. The endpoint then returns the full property data, ready for further interactions.
// @Id createProperty
// @Id create_property
// @Tags Properties
// @Accept json
// @Produce json
@ -137,7 +137,7 @@ func CreatePropertyHandler(s *service.Service) gin.HandlerFunc {
//
// @Summary Update property
// @Description ⚠ Warning: Properties are experimental and may change in the next update. ⚠ This endpoint updates an existing property in the specified space using a JSON payload. The update process is subject to rate limiting. The payload must include the name to be updated. The endpoint then returns the full property data, ready for further interactions.
// @Id updateProperty
// @Id update_property
// @Tags Properties
// @Accept json
// @Produce json
@ -191,7 +191,7 @@ func UpdatePropertyHandler(s *service.Service) gin.HandlerFunc {
//
// @Summary Delete property
// @Description ⚠ Warning: Properties are experimental and may change in the next update. ⚠ This endpoint “deletes” a property by marking it as archived. The deletion process is performed safely and is subject to rate limiting. It returns the propertys details after it has been archived. Proper error handling is in place for situations such as when the property isnt found or the deletion cannot be performed because of permission issues.
// @Id deleteProperty
// @Id delete_property
// @Tags Properties
// @Produce json
// @Param Anytype-Version header string true "The version of the API to use" default(2025-05-20)

View file

@ -15,7 +15,7 @@ import (
//
// @Summary Search objects across all spaces
// @Description Executes a global search over every space accessible by the authenticated user. The request body must specify the `query` text, optional filters on object types (e.g., "page", "task"), and sort directives (default: descending by last updated timestamp). Pagination is controlled via `offset` and `limit` query parameters to facilitate lazy loading in client UIs. The response returns a unified list of matched objects with their metadata and properties.
// @Id searchGlobal
// @Id search_global
// @Tags Search
// @Accept json
// @Produce json
@ -59,7 +59,7 @@ func GlobalSearchHandler(s *service.Service) gin.HandlerFunc {
//
// @Summary Search objects within a space
// @Description Performs a focused search within a single space (specified by the space_id path parameter). Like the global search, it accepts pagination parameters and a JSON payload containing the search query, object types, and sorting preferences. The search is limited to the provided space and returns a list of objects that match the query. This allows clients to implement spacespecific filtering without having to process extraneous results.
// @Id searchSpace
// @Id search_space
// @Tags Search
// @Accept json
// @Produce json

View file

@ -15,7 +15,7 @@ import (
//
// @Summary List spaces
// @Description Retrieves a paginated list of all spaces that are accessible by the authenticated user. Each space record contains detailed information such as the space ID, name, icon (derived either from an emoji or image URL), and additional metadata. This endpoint is key to displaying a users workspaces.
// @Id listSpaces
// @Id list_spaces
// @Tags Spaces
// @Produce json
// @Param Anytype-Version header string true "The version of the API to use" default(2025-05-20)
@ -52,7 +52,7 @@ func ListSpacesHandler(s *service.Service) gin.HandlerFunc {
//
// @Summary Get space
// @Description Fetches full details about a single space identified by its space ID. The response includes metadata such as the space name, icon, and various workspace IDs (home, archive, profile, etc.). This detailed view supports use cases such as displaying space-specific settings.
// @Id getSpace
// @Id get_space
// @Tags Spaces
// @Produce json
// @Param Anytype-Version header string true "The version of the API to use" default(2025-05-20)
@ -88,7 +88,7 @@ func GetSpaceHandler(s *service.Service) gin.HandlerFunc {
//
// @Summary Create space
// @Description Creates a new space based on a supplied name and description in the JSON request body. The endpoint is subject to rate limiting and automatically applies default configurations such as generating a random icon and initializing the workspace with default settings (for example, a default dashboard or home page). On success, the new spaces full metadata is returned, enabling the client to immediately switch context to the new internal.
// @Id createSpace
// @Id create_space
// @Tags Spaces
// @Accept json
// @Produce json
@ -132,7 +132,7 @@ func CreateSpaceHandler(s *service.Service) gin.HandlerFunc {
//
// @Summary Update space
// @Description Updates the name or description of an existing space. The request body should contain the new name and/or description in JSON format. This endpoint is useful for renaming or rebranding a workspace without needing to recreate it. The updated spaces metadata is returned in the response.
// @Id updateSpace
// @Id update_space
// @Tags Spaces
// @Accept json
// @Produce json

View file

@ -15,7 +15,7 @@ import (
//
// @Summary List tags
// @Description This endpoint retrieves a paginated list of tags available for a specific property within a space. Each tag record includes its unique identifier, name, and color. This information is essential for clients to display select or multi-select options to users when they are creating or editing objects. The endpoint also supports pagination through offset and limit parameters.
// @Id listTags
// @Id list_tags
// @Tags Tags
// @Produce json
// @Param Anytype-Version header string true "The version of the API to use" default(2025-05-20)
@ -54,7 +54,7 @@ func ListTagsHandler(s *service.Service) gin.HandlerFunc {
//
// @Summary Get tag
// @Description This endpoint retrieves a tag for a given property id. The tag is identified by its unique identifier within the specified space. The response includes the tag's details such as its ID, name, and color. This is useful for clients to display or when editing a specific tag option.
// @Id getTag
// @Id get_tag
// @Tags Tags
// @Produce json
// @Param Anytype-Version header string true "The version of the API to use" default(2025-05-20)
@ -95,7 +95,7 @@ func GetTagHandler(s *service.Service) gin.HandlerFunc {
//
// @Summary Create tag
// @Description This endpoint creates a new tag for a given property id in a space. The creation process is subject to rate limiting. The tag is identified by its unique identifier within the specified space. The request must include the tag's name and color. The response includes the tag's details such as its ID, name, and color. This is useful for clients when users want to add new tag options to a property.
// @Id createTag
// @Id create_tag
// @Tags Tags
// @Accept json
// @Produce json
@ -143,7 +143,7 @@ func CreateTagHandler(s *service.Service) gin.HandlerFunc {
//
// @Summary Update tag
// @Description This endpoint updates a tag for a given property id in a space. The update process is subject to rate limiting. The tag is identified by its unique identifier within the specified space. The request must include the tag's name and color. The response includes the tag's details such as its ID, name, and color. This is useful for clients when users want to edit existing tags for a property.
// @Id updateTag
// @Id update_tag
// @Tags Tags
// @Accept json
// @Produce json
@ -198,7 +198,7 @@ func UpdateTagHandler(s *service.Service) gin.HandlerFunc {
//
// @Summary Delete tag
// @Description This endpoint “deletes” a tag by marking it as archived. The deletion process is performed safely and is subject to rate limiting. It returns the tags details after it has been archived. Proper error handling is in place for situations such as when the tag isnt found or the deletion cannot be performed because of permission issues.
// @Id deleteTag
// @Id delete_tag
// @Tags Tags
// @Produce json
// @Param Anytype-Version header string true "The version of the API to use" default(2025-05-20)

View file

@ -15,7 +15,7 @@ import (
//
// @Summary List templates
// @Description This endpoint returns a paginated list of templates that are associated with a specific object type within a space. Templates provide preconfigured structures for creating new objects. Each template record contains its identifier, name, and icon, so that clients can offer users a selection of templates when creating objects.
// @Id listTemplates
// @Id list_templates
// @Tags Templates
// @Produce json
// @Param Anytype-Version header string true "The version of the API to use" default(2025-05-20)
@ -57,7 +57,7 @@ func ListTemplatesHandler(s *service.Service) gin.HandlerFunc {
//
// @Summary Get template
// @Description Fetches full details for one template associated with a particular object type in a space. The response provides the templates identifier, name, icon, and any other relevant metadata. This endpoint is useful when a client needs to preview or apply a template to prefill object creation fields.
// @Id getTemplate
// @Id get_template
// @Tags Templates
// @Produce json
// @Param Anytype-Version header string true "The version of the API to use" default(2025-05-20)

View file

@ -15,7 +15,7 @@ import (
//
// @Summary List types
// @Description This endpoint retrieves a paginated list of object types (e.g. 'Page', 'Note', 'Task') available within the specified space. Each types record includes its unique identifier, type key, display name, icon, and layout. While a type's id is truly unique, a type's key can be the same across spaces for known types, e.g. 'page' for 'Page'. Clients use this information when offering choices for object creation or for filtering objects by type through search.
// @Id listTypes
// @Id list_types
// @Tags Types
// @Produce json
// @Param Anytype-Version header string true "The version of the API to use" default(2025-05-20)
@ -52,7 +52,7 @@ func ListTypesHandler(s *service.Service) gin.HandlerFunc {
//
// @Summary Get type
// @Description Fetches detailed information about one specific object type by its ID. This includes the types unique key, name, icon, and layout. This detailed view assists clients in understanding the expected structure and style for objects of that type and in guiding the user interface (such as displaying appropriate icons or layout hints).
// @Id getType
// @Id get_type
// @Tags Types
// @Produce json
// @Param Anytype-Version header string true "The version of the API to use" default(2025-05-20)
@ -91,7 +91,7 @@ func GetTypeHandler(s *service.Service) gin.HandlerFunc {
//
// @Summary Create type
// @Description Creates a new object type in the specified space using a JSON payload. The creation process is subject to rate limiting. The payload must include type details such as the name, icon, and layout. The endpoint then returns the full type data, ready to be used for creating objects.
// @Id createType
// @Id create_type
// @Tags Types
// @Accept json
// @Produce json
@ -137,7 +137,7 @@ func CreateTypeHandler(s *service.Service) gin.HandlerFunc {
//
// @Summary Update type
// @Description This endpoint updates an existing object type in the specified space using a JSON payload. The update process is subject to rate limiting. The payload must include the name and properties to be updated. The endpoint then returns the full type data, ready for further interactions.
// @Id updateType
// @Id update_type
// @Tags Types
// @Accept json
// @Produce json
@ -189,7 +189,7 @@ func UpdateTypeHandler(s *service.Service) gin.HandlerFunc {
//
// @Summary Delete type
// @Description This endpoint “deletes” an object type by marking it as archived. The deletion process is performed safely and is subject to rate limiting. It returns the types details after it has been archived. Proper error handling is in place for situations such as when the type isnt found or the deletion cannot be performed because of permission issues.
// @Id deleteType
// @Id delete_type
// @Tags Types
// @Produce json
// @Param Anytype-Version header string true "The version of the API to use" default(2025-05-20)