first commit

This commit is contained in:
Tomas Dvorak
2026-02-22 10:42:17 +01:00
commit 55885a0e8f
239 changed files with 103690 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
package scraper
import (
"context"
)
// OpenAPIScraper parses OpenAPI/Swagger specifications.
type OpenAPIScraper struct {
config *Config
}
// NewOpenAPIScraper creates a new OpenAPI scraper.
func NewOpenAPIScraper(config *Config) *OpenAPIScraper {
return &OpenAPIScraper{config: config}
}
// Scrape fetches and parses an OpenAPI specification.
func (s *OpenAPIScraper) Scrape(ctx context.Context, source *Source) ([]*Document, error) {
// TODO: Implement OpenAPI parsing
// 1. Fetch spec from URL
// 2. Parse endpoints, schemas, descriptions
// 3. Create documents per endpoint
// 4. Include authentication, parameters
return nil, nil
}
// DetectChanges checks if the spec has been updated.
func (s *OpenAPIScraper) DetectChanges(ctx context.Context, source *Source, lastHash string) (bool, string, error) {
// TODO: Check spec content hash
return false, "", nil
}