Enhance API Documentation with Example Values for Company Forms

- Updated the Swagger and YAML documentation to include example values for various fields in the CompanyForm and AddressForm, improving clarity for API consumers.
- Added example values for fields such as name, type, registration number, tax ID, industry, and more, ensuring comprehensive documentation.
- Enhanced the response structure in the Swagger documentation to provide better guidance on expected data formats and values.
- This update aligns with best practices for API documentation, facilitating easier integration and usage for developers.
This commit is contained in:
n.nakhostin
2025-09-08 11:26:11 +03:30
parent ee830f8c1b
commit 617547def8
4 changed files with 175 additions and 83 deletions
+30 -2
View File
@@ -39,14 +39,19 @@ definitions:
company.AddressForm:
properties:
city:
example: New York
type: string
country:
example: US
type: string
postal_code:
example: "10001"
type: string
state:
example: NY
type: string
street:
example: 123 Main St
type: string
type: object
company.CompanyForm:
@@ -56,41 +61,56 @@ definitions:
- $ref: '#/definitions/company.AddressForm'
description: Address information
annual_revenue:
example: 1000000
type: number
currency:
example: USD
type: string
description:
example: Opplens is a technology company
type: string
email:
example: info@opplens.com
type: string
employee_count:
description: Business information
example: 100
type: integer
founded_year:
example: 2020
type: integer
industry:
example: Technology
type: string
language:
description: Settings
example: en
type: string
name:
example: Opplens
type: string
phone:
description: Contact information
example: "+1234567890"
type: string
registration_number:
example: "1234567890"
type: string
tags:
allOf:
- $ref: '#/definitions/company.CompanyTagsForm'
description: Tags for categorization and search
tax_id:
example: "1234567890"
type: string
timezone:
example: UTC
type: string
type:
example: private
type: string
website:
example: https://opplens.com
type: string
type: object
company.CompanyListResponse:
@@ -99,8 +119,6 @@ definitions:
items:
$ref: '#/definitions/company.CompanyResponse'
type: array
meta:
$ref: '#/definitions/response.Meta'
type: object
company.CompanyProfileResponse:
properties:
@@ -199,22 +217,32 @@ definitions:
company.CompanyTagsForm:
properties:
categories:
example:
- Technology
items:
type: string
type: array
certifications:
example:
- Opplens
items:
type: string
type: array
cpv_codes:
example:
- "1234567890"
items:
type: string
type: array
keywords:
example:
- Opplens
items:
type: string
type: array
specializations:
example:
- Opplens
items:
type: string
type: array