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

notes doesn't seem to work #49

Closed
dkirrane opened this issue Mar 20, 2014 · 6 comments
Closed

notes doesn't seem to work #49

dkirrane opened this issue Mar 20, 2014 · 6 comments

Comments

@dkirrane
Copy link

My api proeprty is like so:

@ApiModelProperty(value = "Some Description", required = true, notes = "Some Notes",)

My wiki.markdown is as follows:

h1. Data Types
{{#dataTypes}}
{anchor:{{name}}}
h3. {{name}}
|| ||*type*||*required*||*schema*||*constraints*||
{{#items}}
|*{{name}}*|{{type}}|{{#required}}required{{/required}}{{^required}}optional{{/required}}|{{#description}}{{{description}}}{{/description}}{{^description}}-{{/description}}|{{#notes}}{{{notes}}}{{/notes}}{{^notes}}-{{/notes}}|
{{/items}}
{{/dataTypes}}

The notes column in the output gets "Some Description" rather than "Some Notes"

@kongchen
Copy link
Owner

Here's the code of com.wordnik.swagger.model.ModelProperty :


case class ModelProperty(
  `type`: String,
  qualifiedType: String,
  position: Int = 0,
  required: Boolean = false,
  description: Option[String] = None,
  allowableValues: AllowableValues = AnyAllowableValues,
  items: Option[ModelRef] = None)

You can see there's no notes there.
For notes in the plugin, it must be a legacy problem when I upgrade from swagger 1.1 to 1.2, just ignore it :)

@dkirrane
Copy link
Author

Ok, I'm using

        <dependency>
            <groupId>com.wordnik</groupId>
            <artifactId>swagger-annotations</artifactId>
            <version>1.3.2</version>
        </dependency>

Looks like com.wordnik.swagger.model.ModelProperty was replaced with com.wordnik.swagger.annotations.ApiModelProperty which has a notes field

@kongchen
Copy link
Owner

The reader: com.wordnik.swagger.jaxrs.JaxrsApiReader reads com.wordnik.swagger.annotations.ApiModelProperty to com.wordnik.swagger.model.ModelProperty, and I use ModelProperty to generate your document. I think it's an issue of com.wordnik.swagger.jaxrs.JaxrsApiReader

@fehguy
Copy link

fehguy commented Mar 24, 2014

Hi, please open an issue in swagger-core and put in a sample model.

@kongchen
Copy link
Owner

Hi @fehguy , please see swagger-api/swagger-core#508

@kongchen
Copy link
Owner

kongchen commented Sep 3, 2014

Close this issue for the reason of swagger-api/swagger-core#508 (comment)

@kongchen kongchen closed this as completed Sep 3, 2014
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

3 participants