> ## Documentation Index
> Fetch the complete documentation index at: https://gogs.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get editorconfig definition

> Returns the editorconfig definition for the given filename in the repository.



## OpenAPI

````yaml GET /repos/{owner}/{repo}/editorconfig/{filename}
openapi: 3.0.3
info:
  title: Gogs API
  version: v1
  description: >-
    RESTful API for interacting with your Gogs instance. Follows a format
    similar to the GitHub REST API v3.
servers:
  - url: https://gogs.example.com/api/v1
security:
  - AccessToken: []
tags:
  - name: Repositories
    description: Create, search, and manage repositories, branches, commits, and contents
  - name: Collaborators and Deploy Keys
    description: Manage repository collaborators and deploy keys
  - name: Releases
    description: List repository releases
  - name: Webhooks
    description: Create, edit, and delete repository webhooks
  - name: Issues
    description: Manage issues, comments, labels, and milestones
  - name: Users
    description: Search users, manage access tokens, emails, followers, and public keys
  - name: Organizations
    description: Manage organizations, members, and teams
  - name: Administration
    description: Site administration endpoints (requires admin privileges)
  - name: Miscellaneous
    description: Markdown rendering and Git data endpoints
paths:
  /repos/{owner}/{repo}/editorconfig/{filename}:
    get:
      tags:
        - Repositories
      summary: Get editorconfig definition
      description: >-
        Returns the editorconfig definition for the given filename in the
        repository.
      operationId: getEditorconfig
      parameters:
        - name: owner
          in: path
          required: true
          schema:
            type: string
          description: Owner of the repository
        - name: repo
          in: path
          required: true
          schema:
            type: string
          description: Name of the repository
        - name: filename
          in: path
          required: true
          schema:
            type: string
          description: Filename to get the editorconfig definition for
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EditorConfigDefinition'
        '404':
          description: >-
            No editorconfig file exists or no matching definition for the
            filename.
components:
  schemas:
    EditorConfigDefinition:
      type: object
      properties:
        charset:
          type: string
        indent_style:
          type: string
        indent_size:
          type: string
        end_of_line:
          type: string
  securitySchemes:
    AccessToken:
      type: apiKey
      in: header
      name: Authorization
      description: 'Personal access token. Use format: token {YOUR_ACCESS_TOKEN}'

````