-
Notifications
You must be signed in to change notification settings - Fork 137
fix: standardize nullable refs and correct array items syntax #1996
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Preview for this PR was built for commit |
fnesveda
approved these changes
Oct 10, 2025
Member
fnesveda
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, good catch 🙂
bliuchak
added a commit
that referenced
this pull request
Nov 14, 2025
…2078) This PR follows up on #2000. **What** Adds automated validation of our OpenAPI specification by generating a Go client from the spec and verifying that the generated code compiles successfully. **Why** - Fast feedback loop: Catch OpenAPI spec issues immediately by validating that client generation and compilation succeed. - Spec compliance: Ensure our OpenAPI spec adheres to the standard by using it in a real-world scenario (client generation + build). - Foundation for multi-language clients: While the generated code is currently discarded after validation, this establishes the infrastructure to generate and publish clients for multiple languages (e.g., TypeScript, Python) in the future. This approach provides validation beyond just schema checking - if the generated Go client builds successfully, we can be confident the spec is both valid and practical to use. **Folder structure** The repository structure follows these conventions: - `codegen/` - Contains only generated code (files, folders, etc.) and should never be modified manually. - `oapi-codegen-go/` - Follows the naming pattern [tool-name]-[language] where: - `oapi-codegen` is the code generation tool. - `go` is the target language. This convention makes it straightforward to add support for additional tools and languages in the future (e.g., openapi-generator-typescript, oapi-codegen-python). **Examples** - This is an [example](https://github.com/apify/apify-docs/actions/runs/19227338449/job/54957493226?pr=2078) of successfull action. - This is an [example](https://github.com/apify/apify-docs/actions/runs/19227226704/job/54957143384?pr=2078) of failed action (can generate Go client but compilation failed due to invalid OpenAPI spec). **Refs** - #1996 - #2057 <!-- CURSOR_SUMMARY --> > [!NOTE] > Adds a CI job that builds the OpenAPI spec, generates a Go client via oapi-codegen, and compiles it, with accompanying codegen config and ignores. > > - **CI/CD (`.github/workflows/openapi.yaml`)**: > - **New job `validate-go-codegen`**: Builds OpenAPI YAML, installs `oapi-codegen`, generates Go client, and builds it with Go 1.25. > - Update existing build to Node.js `24` and run `redoc:test`. > - **Go client codegen setup**: > - Add `codegen/oapi-codegen-go/go.mod` declaring tool and deps. > - Add `codegen/oapi-codegen-go/oapi-codegen.yaml` configuring client/model generation to `generated/client.gen.go`. > - **Repo housekeeping**: > - Update `.gitignore` to exclude `codegen/*/generated/` and `codegen/*/go.sum`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit e657bac. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
adhoc
Ad-hoc unplanned task added during the sprint.
bug
Something isn't working.
t-core-services
Issues with this label are in the ownership of the core services team.
validated
Issues that are resolved and their solutions fulfill the acceptance criteria.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fix two places where docs used non-standard (according to OpenAPI 3.0) spec.
Why? I was playing with
oapi-codegettool for generation Go client fromopenapi.yaml. Without these changes I wasn't able to generate it.I got these errors:
Caused by incorrect ProxyGroup ref
Caused by incorrect nullable ActorDefinition
Details about oapi-codegen:
Places for verification:
nullablelabel toActorDefinitionin schema)Proxyinstead ofundefined)