Skip to content
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

Build failing on Writing generated docs step #1057

Open
brianchou121 opened this issue Feb 14, 2024 · 3 comments
Open

Build failing on Writing generated docs step #1057

brianchou121 opened this issue Feb 14, 2024 · 3 comments

Comments

@brianchou121
Copy link

brianchou121 commented Feb 14, 2024

Hi team, one of our properties can be one of multiple types. We have defined it as the following:

"DefaultValue": {
      "oneOf": [
        {
          "type": "array"
        },
        {
          "type": "boolean"
        },
        {
          "type": "object"
        },
        {
          "type": "string"
        },
        {
          "type": "integer"
        }
      ],
      "description": "sampletext"
    },

we are unable to build successfully and it seems to be failing on rpdkGenerateSource in the writing docs generating step.

@kddejong
Copy link
Contributor

if you specify a type of array you will need to specify the items or the shape of the items in that array.

Also worth noting depending on what you are doing and how you want to use it you can specify multiple types at the same layer.

"type": ["array", "string"],
"items": {
  "type": "string"
}

This is technically valid against the schema but how the cli but may result in varying success depending on the language plugins ability to handle different types.

@brianchou121
Copy link
Author

brianchou121 commented Feb 14, 2024

we are looking into defining defaultValue as any type essentially. Is there a more "correct" way of doing this. Technically it could be an array of anything so it would kind of be "inifinitely" nested

@brianchou121
Copy link
Author

also tried using definitions and references but seems like its not possible - any suggestions?

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

No branches or pull requests

2 participants