Skip to content

Fix/quirks#18

Merged
fredbi merged 8 commits intogo-openapi:masterfrom
fredbi:fix/quirks
Apr 20, 2026
Merged

Fix/quirks#18
fredbi merged 8 commits intogo-openapi:masterfrom
fredbi:fix/quirks

Conversation

@fredbi
Copy link
Copy Markdown
Member

@fredbi fredbi commented Apr 20, 2026

Change type

Please select: 🆕 New feature or enhancement|🔧 Bug fix'|📃 Documentation update

Short description

Fixes

Full description

Checklist

  • I have signed all my commits with my name and email (see DCO. This does not require a PGP-signed commit
  • I have rebased and squashed my work, so only one commit remains
  • I have added tests to cover my changes.
  • I have properly enriched go doc comments in code.
  • I have properly documented any breaking change.

fredbi added 8 commits April 20, 2026 21:23
All annotations should start their comment line.

This fixes incorrect detection of annotation-like text buried in a sentence,
which may capture an unintended argument.

Tolerance: we allow leading blank space or other "noise" that would come
in YAML blocks or markdown comments (e.g. "|", "*", "-").

Exception: the "swagger:route" annotation is an exception and may come
after the convention godoc identifier identifier, as in:

```
// MyRoutes swagger:route {args}
```

This exception is left for backward-compatibility as it is already
present in some published examples of code, but should not be considered
the rule.

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
…tatement.

In this case, the generated extension reuses the same shared doc string.

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
This addresses the case when an aliased text marshaler (e.g. alias to time.Time)
is not properly identified as such.

Now when alias-as-ref is enabled, the type properly resolves with a $ref to its underlying type
definition.

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
Fixes type information loss inside an allOf (text marshaler type was not properly detected).

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
…scriptions

The field description was adding "in:" in parameters or headers, since
"in:" is not recognized as a full-fledged annotation.

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
…ching identifier.

This prevents the generation of descriptions that stutter.

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
…ified (camel-cased)

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
Specifically for structs marked as strfmt (e.g. time.Time, UUID...), the
referenced structs types resurface in the produced spec as orphan types
(no $ref points to them).

NOTE: if the type is annotated as a model, the struct surfaces back anyway
(captures user intent).

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 20, 2026

Codecov Report

❌ Patch coverage is 86.02151% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.08%. Comparing base (8500f21) to head (78c407c).
⚠️ Report is 9 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
internal/builders/schema/schema.go 78.04% 5 Missing and 4 partials ⚠️
internal/scanner/scan_context.go 91.66% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #18      +/-   ##
==========================================
- Coverage   87.19%   87.08%   -0.11%     
==========================================
  Files          43       43              
  Lines        3958     3996      +38     
==========================================
+ Hits         3451     3480      +29     
- Misses        314      319       +5     
- Partials      193      197       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fredbi fredbi merged commit b5d5d3d into go-openapi:master Apr 20, 2026
21 checks passed
@fredbi fredbi deleted the fix/quirks branch April 20, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant