Skip to content

Setting default enum values fails if the symbol has been sanitized #2360

Closed

Description

source:
                  type: object
                  description: The source branch and directory used to publish your
                    Pages site.
                  properties:
                    branch:
                      type: string
                      description: The repository branch used to publish your site's
                        source files.
                    path:
                      type: string
                      description: 'The repository directory that includes the source
                        files for the Pages site. Allowed paths are `/` or `/docs`.
                        Default: `/`'
                      enum:
                      - "/"
                      - "/docs"
                      default: "/"

Results in

        /// <summary>The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/`</summary>
        public PagesPostRequestBody_source_path? Path { get; set; }
        /// <summary>
        /// Instantiates a new pagesPostRequestBody_source and sets the default values.
        /// </summary>
        public PagesPostRequestBody_source() {
            AdditionalData = new Dictionary<string, object>();
            Path = PagesPostRequestBody_source_path.; //value mapping is missing
        }

We should support that case or at least give up on setting up the default if we couldn't find the enum option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

CsharpPull requests that update .net codeWIPgeneratorIssues or improvements relater to generation capabilities.type:bugA broken experience

Type

No type

Projects

  • Status

    Done ✔️

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions