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:
+60
-28
@@ -5150,19 +5150,24 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"city": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "New York"
|
||||
},
|
||||
"country": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "US"
|
||||
},
|
||||
"postal_code": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "10001"
|
||||
},
|
||||
"state": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "NY"
|
||||
},
|
||||
"street": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "123 Main St"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -5178,40 +5183,51 @@
|
||||
]
|
||||
},
|
||||
"annual_revenue": {
|
||||
"type": "number"
|
||||
"type": "number",
|
||||
"example": 1000000
|
||||
},
|
||||
"currency": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "USD"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "Opplens is a technology company"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "info@opplens.com"
|
||||
},
|
||||
"employee_count": {
|
||||
"description": "Business information",
|
||||
"type": "integer"
|
||||
"type": "integer",
|
||||
"example": 100
|
||||
},
|
||||
"founded_year": {
|
||||
"type": "integer"
|
||||
"type": "integer",
|
||||
"example": 2020
|
||||
},
|
||||
"industry": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "Technology"
|
||||
},
|
||||
"language": {
|
||||
"description": "Settings",
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "en"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "Opplens"
|
||||
},
|
||||
"phone": {
|
||||
"description": "Contact information",
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "+1234567890"
|
||||
},
|
||||
"registration_number": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "1234567890"
|
||||
},
|
||||
"tags": {
|
||||
"description": "Tags for categorization and search",
|
||||
@@ -5222,16 +5238,20 @@
|
||||
]
|
||||
},
|
||||
"tax_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "1234567890"
|
||||
},
|
||||
"timezone": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "UTC"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "private"
|
||||
},
|
||||
"website": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "https://opplens.com"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -5243,9 +5263,6 @@
|
||||
"items": {
|
||||
"$ref": "#/definitions/company.CompanyResponse"
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"$ref": "#/definitions/response.Meta"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -5396,31 +5413,46 @@
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"example": [
|
||||
"Technology"
|
||||
]
|
||||
},
|
||||
"certifications": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"example": [
|
||||
"Opplens"
|
||||
]
|
||||
},
|
||||
"cpv_codes": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"example": [
|
||||
"1234567890"
|
||||
]
|
||||
},
|
||||
"keywords": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"example": [
|
||||
"Opplens"
|
||||
]
|
||||
},
|
||||
"specializations": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"example": [
|
||||
"Opplens"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user