Refactor ScrapePortalsResponse structure and update API documentation
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
- Changed the ScrapePortalsResponse type to return a slice of strings representing portal identifiers instead of a structured object. - Updated the Swagger documentation for the GetScrapePortals endpoint to reflect the new response format, ensuring clarity in API usage. This update simplifies the response structure for the scraping portals, enhancing the API's usability and consistency.
This commit is contained in:
@@ -173,18 +173,8 @@ type ScrapeDocumentsBatchRequest struct {
|
||||
Tenders []TenderRef `json:"tenders"`
|
||||
}
|
||||
|
||||
// ScrapePortal describes one document scraping portal supported by the AI service.
|
||||
type ScrapePortal struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
CountryCode string `json:"country_code,omitempty"`
|
||||
Countries []string `json:"countries,omitempty"`
|
||||
}
|
||||
|
||||
// ScrapePortalsResponse is returned by GET /scrape/portals.
|
||||
type ScrapePortalsResponse struct {
|
||||
Portals []ScrapePortal `json:"portals"`
|
||||
}
|
||||
// ScrapePortalsResponse is returned by GET /scrape/portals — portal identifiers.
|
||||
type ScrapePortalsResponse []string
|
||||
|
||||
// SummarizeBatchRequest is the payload for POST /ai/summarize/batch.
|
||||
type SummarizeBatchRequest struct {
|
||||
|
||||
Reference in New Issue
Block a user