Skip to content

[BUG] Functions described in documentation but not present in code #20007

Open
@smutel

Description

@smutel

[BUG] Functions described in documentation but not present in code

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

After generation some functions are explained in the documentation but they does not exist in the code.
Unfortunately I need these functions.

After generation:

$ grep -R SetDefaultNil docs/*
docs/CustomField.md:### SetDefaultNil
docs/CustomField.md:`func (o *CustomField) SetDefaultNil(b bool)`
docs/CustomField.md: SetDefaultNil sets the value for Default to be an explicit nil
docs/CustomFieldRequest.md:### SetDefaultNil
docs/CustomFieldRequest.md:`func (o *CustomFieldRequest) SetDefaultNil(b bool)`
docs/CustomFieldRequest.md: SetDefaultNil sets the value for Default to be an explicit nil
docs/PatchedWritableCustomFieldRequest.md:### SetDefaultNil
docs/PatchedWritableCustomFieldRequest.md:`func (o *PatchedWritableCustomFieldRequest) SetDefaultNil(b bool)`
docs/PatchedWritableCustomFieldRequest.md: SetDefaultNil sets the value for Default to be an explicit nil
docs/WritableCustomFieldRequest.md:### SetDefaultNil
docs/WritableCustomFieldRequest.md:`func (o *WritableCustomFieldRequest) SetDefaultNil(b bool)`
docs/WritableCustomFieldRequest.md: SetDefaultNil sets the value for Default to be an explicit nil
$ grep -R SetDefaultNil *.go
$
openapi-generator version

v7.9.0

I don't think that it's a regression.

OpenAPI declaration file content or url
default:                                                                                    
  nullable: true                                                                            
  description: Default value for the field (must be a JSON value). Encapsulate strings with double quotes (e.g. "Foo").

Complete file: https://raw.githubusercontent.com/netbox-community/go-netbox/refs/tags/v4.0.3-0/api/openapi.yaml

Generation Details
Steps to reproduce
$ git clone [email protected]:netbox-community/go-netbox.git
$ git checkout v4.0.3-0
$ make
$ make build
Related issues/PRs

I tried to look at the current issues but there is so much issues, perhaps some of them are related to this issue ...

Suggest a fix

Not able to fix the issue for the moment.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions