Repository Analysis

oapi-codegen/oapi-codegen

Generate Go client and server boilerplate from OpenAPI 3 specifications

3.3 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of oapi-codegen/oapi-codegen, a Go project with 8,448 GitHub stars. SynthScan v2.0 examined 156,052 lines of code across 985 source files, recording 362 pattern matches distributed across 7 syntactic categories. The overall adjusted score of 3.3 places this repository in the Likely human-written band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

3.3
Adjusted Score
3.3
Raw Score
100%
Time Factor
2026-07-14
Last Push
8.4K
Stars
Go
Language
156.1K
Lines of Code
985
Files
362
Pattern Hits
2026-07-14
Scan Date
0.00
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 1HIGH 0MEDIUM 67LOW 294

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 362 distinct pattern matches across 7 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Over-Commented Block286 hits · 286 pts
SeverityFileLineSnippetContext
LOWcmd/oapi-codegen/oapi-codegen.go1// Copyright 2019 DeepMap, Inc.COMMENT
LOWinternal/test/clients/clients.gen.go601 // PostBothWithBodyWithResponse performs a POST /with_both_bodies (the `PostBoth` operationId) request,COMMENT
LOWinternal/test/clients/clients.gen.go621COMMENT
LOWinternal/test/clients/responseheaders/doc.go1// Package responseheaders verifies that response headers declared in theCOMMENT
LOWinternal/test/options/compatibility/doc.go1// Package optionscompatibility exercises the compatibility output options.COMMENT
LOW…ternal/test/options/compatibility/compatibility.gen.go101}COMMENT
LOWinternal/test/options/skip_prune/skip_prune_test.go1package optionsskippruneCOMMENT
LOWinternal/test/options/skip_prune/doc.go1// Package optionsskipprune exercises the output-options skip-prune flag:COMMENT
LOW…rnal/test/options/skip_prune/config_default_prune.yaml1# yaml-language-server: $schema=../../../../configuration-schema.jsonCOMMENT
LOWinternal/test/options/type_aliases/doc.go1// Package optionstypealiases exercises output-options.disable-type-aliases-for-type:COMMENT
LOWinternal/test/options/name_normalizer/spec.yaml1# ==========================================================================COMMENT
LOWinternal/test/options/name_normalizer/unset/doc.go1// Package optionsnamenormalizerunset checks that, with name-normalizer unset,COMMENT
LOW…rnal/test/options/name_normalizer/to_camel_case/doc.go1// Package optionsnamenormalizertocamelcase checks that name-normalizer:COMMENT
LOW…lizer/to_camel_case_with_additional_initialisms/doc.go1// Package optionsnamenormalizertocamelcasewithadditionalinitialisms checksCOMMENT
LOW…tions/name_normalizer/to_camel_case_with_digits/doc.go1// Package optionsnamenormalizertocamelcasewithdigits checks thatCOMMENT
LOW…/name_normalizer/to_camel_case_with_initialisms/doc.go1// Package optionsnamenormalizertocamelcasewithinitialisms checks thatCOMMENT
LOWinternal/test/options/response_getters/spec.yaml1# ==========================================================================COMMENT
LOWinternal/test/options/response_getters/skipped/doc.go1// Package optionsresponsegettersskipped checks that, with skip-response-body-gettersCOMMENT
LOWinternal/test/options/response_getters/enabled/doc.go1// Package optionsresponsegettersenabled checks that, with skip-response-body-gettersCOMMENT
LOWinternal/test/options/filter/server.yaml1# ==========================================================================COMMENT
LOWinternal/test/options/filter/doc.go1// Package optionsfilter drives generation of the operations/ and tags/ sub-packages,COMMENT
LOWinternal/test/options/yaml_tags/doc.go1// Package optionsyamltags exercises the yaml-tags output option: when enabled,COMMENT
LOWinternal/test/bodies/responses/content/content_test.go1package responsescontentCOMMENT
LOWinternal/test/bodies/responses/content/doc.go1// Package responsescontent verifies that a components/responses entryCOMMENT
LOWinternal/test/bodies/responses/headers/doc.go1// Package responseheaders verifies that response headers declared on anCOMMENT
LOWinternal/test/bodies/requests/requests.gen.go101// The interface specification for the client above.COMMENT
LOWinternal/test/bodies/requests/requests.gen.go261 // with any type of body and a specified content type.COMMENT
LOWinternal/test/bodies/requests/doc.go1// Package bodiesrequests exercises request bodies combined with parameters in the generatedCOMMENT
LOWinternal/test/bodies/content_types/spec.yaml1# ==========================================================================COMMENT
LOWinternal/test/bodies/content_types/doc.go1// Package bodiescontenttypes exercises request/response content-type handling.COMMENT
LOWinternal/test/bodies/content_types/content_types.gen.go381 // with any type of body and a specified content type.COMMENT
LOWinternal/test/bodies/content_types/content_types.gen.go901 //COMMENT
LOWinternal/test/bodies/content_types/content_types.gen.go921 //COMMENT
LOWinternal/test/bodies/content_types/content_types.gen.go941 //COMMENT
LOWinternal/test/bodies/content_types/text_and_json/doc.go1// Package textandjson verifies strict-server codegen for an operationCOMMENT
LOW…ernal/test/bodies/content_types/text_non_string/doc.go1// Package textnonstring verifies strict-server codegen for text/plainCOMMENT
LOWinternal/test/bodies/content_types/multi_json/doc.go1// Package multijson verifies that an operation declaring multipleCOMMENT
LOWinternal/test/aggregates/anyof/spec.yaml1# ==========================================================================COMMENT
LOWinternal/test/aggregates/anyof/anyof.gen.go701// The interface specification for the client above.COMMENT
LOWinternal/test/aggregates/anyof/anyof.gen.go981 //COMMENT
LOWinternal/test/aggregates/anyof/doc.go1// Package aggregatesanyof exercises anyOf/oneOf/allOf union types in multiple forms:COMMENT
LOWinternal/test/aggregates/hoisting/spec_implicit.yaml1# ==========================================================================COMMENT
LOWinternal/test/aggregates/hoisting/doc.go1// Package aggregateshoisting exercises anonymous inner schema hoisting into namedCOMMENT
LOWinternal/test/aggregates/allof/doc.go1// Package aggregatesallof exercises allOf composition and additionalProperties mergeCOMMENT
LOWinternal/test/aggregates/allof/config_old_merge.yaml1# yaml-language-server: $schema=../../../../configuration-schema.jsonCOMMENT
LOWinternal/test/aggregates/allof/config_new_merge.yaml1# yaml-language-server: $schema=../../../../configuration-schema.jsonCOMMENT
LOWinternal/test/aggregates/oneof/doc.go1// Package aggregatesoneof exercises oneOf code generation: discriminator-driven unionsCOMMENT
LOW…ternal/test/references/multipackage/externalref.gen.go141// specification: decompressed but not unmarshaled. External referencesCOMMENT
LOWinternal/test/references/multipackage/header_ref/doc.go1// Package headerref is a regression test for issue-2060: a response headerCOMMENT
LOW…/references/multipackage/header_ref/gen/api/api.gen.go21// RequestEditorFn is the function signature for the RequestEditor callback functionCOMMENT
LOW…st/references/multipackage/packageB/externalref.gen.go161// specification: decompressed but not unmarshaled. External referencesCOMMENT
LOW…al/test/references/multipackage/pruned_deps/api.gen.go41//COMMENT
LOW…t/references/multipackage/pruned_deps/deps/deps.gen.go21 //COMMENT
LOW…t/references/multipackage/pruned_deps/deps/deps.gen.go41// Error defines model for Error.COMMENT
LOW…rnal/test/references/multipackage/response_cast/doc.go1// Regression fixture for https://github.com/oapi-codegen/oapi-codegen/issues/2010.COMMENT
LOW…ernal/test/references/multipackage/parent_child/doc.go1// This is an example of how to reference models of one api specification from another.COMMENT
LOW…ces/multipackage/parent_child/api/parent/parent.gen.go281// GetSpecJSON returns the raw JSON bytes of the embedded OpenAPICOMMENT
LOW…ences/multipackage/parent_child/api/child/child.gen.go281COMMENT
LOW…overlays/external_json_ref/packageA/externalref.gen.go101 returnCOMMENT
LOW…ences/external/path_item_refs/bionicle/bionicle.gen.go441// GetSwagger returns the OpenAPI specification corresponding to theCOMMENT
226 more matches not shown…
Decorative Section Separators64 hits · 198 pts
SeverityFileLineSnippetContext
MEDIUMinternal/test/options/compatibility/spec.yaml1# ==========================================================================COMMENT
MEDIUMinternal/test/options/compatibility/spec.yaml8# ==========================================================================COMMENT
MEDIUMinternal/test/options/skip_prune/spec.yaml1# ==========================================================================COMMENT
MEDIUMinternal/test/options/skip_prune/spec.yaml7# ==========================================================================COMMENT
MEDIUM…ternal/test/options/skip_prune/spec_default_prune.yaml1# ==========================================================================COMMENT
MEDIUM…ternal/test/options/skip_prune/spec_default_prune.yaml7# ==========================================================================COMMENT
MEDIUMinternal/test/options/type_aliases/spec.yaml1# ==========================================================================COMMENT
MEDIUMinternal/test/options/type_aliases/spec.yaml7# ==========================================================================COMMENT
MEDIUMinternal/test/options/name_normalizer/spec.yaml1# ==========================================================================COMMENT
MEDIUMinternal/test/options/name_normalizer/spec.yaml24# ==========================================================================COMMENT
MEDIUMinternal/test/options/response_getters/spec.yaml1# ==========================================================================COMMENT
MEDIUMinternal/test/options/response_getters/spec.yaml14# ==========================================================================COMMENT
MEDIUMinternal/test/options/filter/server.yaml1# ==========================================================================COMMENT
MEDIUMinternal/test/options/filter/server.yaml12# ==========================================================================COMMENT
MEDIUMinternal/test/options/yaml_tags/spec.yaml1# ==========================================================================COMMENT
MEDIUMinternal/test/options/yaml_tags/spec.yaml7# ==========================================================================COMMENT
MEDIUMinternal/test/bodies/content_types/spec.yaml1# ==========================================================================COMMENT
MEDIUMinternal/test/bodies/content_types/spec.yaml19# ==========================================================================COMMENT
MEDIUMinternal/test/aggregates/anyof/spec.yaml1# ==========================================================================COMMENT
MEDIUMinternal/test/aggregates/anyof/spec.yaml11# ==========================================================================COMMENT
MEDIUMinternal/test/aggregates/hoisting/spec_explicit.yaml1# ==========================================================================COMMENT
MEDIUMinternal/test/aggregates/hoisting/spec_explicit.yaml9# ==========================================================================COMMENT
MEDIUMinternal/test/aggregates/hoisting/spec_implicit.yaml1# ==========================================================================COMMENT
MEDIUMinternal/test/aggregates/hoisting/spec_implicit.yaml11# ==========================================================================COMMENT
MEDIUMinternal/test/aggregates/allof/spec.yaml1# ==========================================================================COMMENT
MEDIUMinternal/test/aggregates/allof/spec.yaml10# ==========================================================================COMMENT
MEDIUMinternal/test/aggregates/allof/spec_new_merge.yaml1# ==========================================================================COMMENT
MEDIUMinternal/test/aggregates/allof/spec_new_merge.yaml8# ==========================================================================COMMENT
MEDIUMinternal/test/aggregates/allof/spec_old_merge.yaml1# ==========================================================================COMMENT
MEDIUMinternal/test/aggregates/allof/spec_old_merge.yaml8# ==========================================================================COMMENT
MEDIUMinternal/test/schemas/security/spec.yaml1# ==========================================================================COMMENT
MEDIUMinternal/test/schemas/security/spec.yaml8# ==========================================================================COMMENT
MEDIUMinternal/test/schemas/recursive/spec.yaml1# ==========================================================================COMMENT
MEDIUMinternal/test/schemas/recursive/spec.yaml9# ==========================================================================COMMENT
MEDIUMinternal/test/schemas/primitives/spec.yaml1# ==========================================================================COMMENT
MEDIUMinternal/test/schemas/primitives/spec.yaml11# ==========================================================================COMMENT
MEDIUMinternal/test/schemas/deprecated/spec.yaml1# ==========================================================================COMMENT
MEDIUMinternal/test/schemas/deprecated/spec.yaml14# ==========================================================================COMMENT
MEDIUM…ternal/test/extensions/skip_optional_pointer/spec.yaml1# ==========================================================================COMMENT
MEDIUM…ternal/test/extensions/skip_optional_pointer/spec.yaml11# ==========================================================================COMMENT
MEDIUMinternal/test/extensions/struct_tags/spec.yaml1# ==========================================================================COMMENT
MEDIUMinternal/test/extensions/struct_tags/spec.yaml11# ==========================================================================COMMENT
MEDIUM…est/extensions/struct_tags/spec_extra_tags_params.yaml1# ==========================================================================COMMENT
MEDIUM…est/extensions/struct_tags/spec_extra_tags_params.yaml9# ==========================================================================COMMENT
MEDIUMinternal/test/extensions/x_order/spec.yaml1# ==========================================================================COMMENT
MEDIUMinternal/test/extensions/x_order/spec.yaml7# ==========================================================================COMMENT
MEDIUMinternal/test/extensions/x_go_type/spec.yaml1# ==========================================================================COMMENT
MEDIUMinternal/test/extensions/x_go_type/spec.yaml12# ==========================================================================COMMENT
MEDIUMinternal/test/naming/conflicts/spec.yaml1# ==========================================================================COMMENT
MEDIUMinternal/test/naming/conflicts/spec.yaml10# ==========================================================================COMMENT
MEDIUMinternal/test/naming/conflicts/spec_importnames.yaml1# ==========================================================================COMMENT
MEDIUMinternal/test/naming/conflicts/spec_importnames.yaml8# ==========================================================================COMMENT
MEDIUMinternal/test/naming/identifiers/spec.yaml1# ==========================================================================COMMENT
MEDIUMinternal/test/naming/identifiers/spec.yaml11# ==========================================================================COMMENT
MEDIUMinternal/test/servers/routers/trailing_slash/spec.yaml1# ==========================================================================COMMENT
MEDIUMinternal/test/servers/routers/trailing_slash/spec.yaml8# ==========================================================================COMMENT
MEDIUMinternal/test/openapi31/spec.yaml1# ==========================================================================COMMENT
MEDIUMinternal/test/openapi31/spec.yaml12# ==========================================================================COMMENT
MEDIUMinternal/test/openapi31/spec.yaml29 # ----------------------------------------------------------------------COMMENT
MEDIUMinternal/test/openapi31/spec.yaml31 # ----------------------------------------------------------------------COMMENT
4 more matches not shown…
AI Slop Vocabulary3 hits · 12 pts
SeverityFileLineSnippetContext
MEDIUMinternal/test/aggregates/oneof/config_components.yaml4# components.yaml fold: comprehensive oneOf + anyOf marshaling / discriminator cases.COMMENT
MEDIUMinternal/test/schemas/deprecated/spec.yaml9# - deprecation/ (comprehensive) (deprecated operations/params/bodies/headers/objects)COMMENT
MEDIUMinternal/test/naming/conflicts/spec.yaml9# - name_conflict_resolution (comprehensive conflict resolution patterns A-M)COMMENT
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippetContext
CRITICALpkg/codegen/operations.go184 if s := pd.Spec.Schema.Value.Type.Slice(); len(s) > 0 {CODE
Verbosity Indicators3 hits · 6 pts
SeverityFileLineSnippetContext
LOWpkg/codegen/resolve_names.go21 // Step 1: Generate candidate names for all schemasCOMMENT
LOWpkg/codegen/resolve_names.go33 // Step 2: Resolve collisions iterativelyCOMMENT
LOWpkg/codegen/resolve_names.go36 // Step 3: Build the result mapCOMMENT
Structural Annotation Overuse3 hits · 6 pts
SeverityFileLineSnippetContext
LOWpkg/codegen/resolve_names.go21 // Step 1: Generate candidate names for all schemasCOMMENT
LOWpkg/codegen/resolve_names.go33 // Step 2: Resolve collisions iterativelyCOMMENT
LOWpkg/codegen/resolve_names.go36 // Step 3: Build the result mapCOMMENT
Fake / Example Data2 hits · 2 pts
SeverityFileLineSnippetContext
LOWexamples/authenticated-api/echo/server/fake_jws.go28const KeyID = `fake-key-id`CODE
LOWexamples/authenticated-api/stdhttp/server/fake_jws.go28const KeyID = `fake-key-id`CODE