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

Support hiding certain models/fields in apidoc-ui #88

Open
jerrypnz opened this issue May 3, 2017 · 3 comments
Open

Support hiding certain models/fields in apidoc-ui #88

jerrypnz opened this issue May 3, 2017 · 3 comments

Comments

@jerrypnz
Copy link

jerrypnz commented May 3, 2017

Sometimes we want to hide some (optional) models/fields because they are not ready for public release or intended for internal usage. We may be able to support this by using apidoc attributes.

We can introduce a custom attribute internal that can be recognised by apidoc-ui and anything with that attribute are not displayed.

@kalmanb
Copy link
Contributor

kalmanb commented May 3, 2017

This should be easy, we just need to confirm the api. How about this?

"attributes": [
  { "name": "apidoc-ui",
    "value": {
        "visibility": "public(default)|organization|user|none"
    }
  }
],

@jerrypnz
Copy link
Author

jerrypnz commented May 3, 2017

@kalmanb That looks good to me. Do we want to name it apidoc-ui or something more generic (I think this attribute can be useful in generators as well) ?

@kalmanb
Copy link
Contributor

kalmanb commented May 4, 2017

Good point. Here's what we'll go for. We'll implement ui first, generators later if needed

"attributes": [
  { 
    "name": "visibility",
    "descrption": "Should an element be displayed in the UI and created by generators",
    "value": {
        "ui": "default|public|organization|user|none",
        "generators": {
            "default": "default|public|organization|user|none",
            "scala": "default|public|organization|user|none",
    }
  }
],

@kalmanb kalmanb added this to the later milestone Jun 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants