Skip to content

Conversation

@shardings
Copy link
Contributor

The adoc output of a path' example always use the default value.For
example in the unit test:

  • pets/{petId} use the path params petId with example 30, but the
    output adoc rendered pets/0 (0 is the default value of int param)
  • pets/{findByTags} use the query params tags with example adorable,
    but the output adoc rendered "tags":"string" ("string" is the default
    value of string param)

It should use the "x-example" of the swagger(also the method example()
of the swagger-core jar.
This is the first commit to fix this problem, which add the
unit test for it.

The adoc output of a path' example always use the default value.For
example in the unit test:

* pets/{petId} use the path params `petId` with example 30, but the
output adoc rendered pets/0 (0 is the default value of int param)
* pets/{findByTags} use the query params `tags` with example adorable,
but the output adoc rendered "tags":"string" ("string" is the default
value of string param)

It should use the "x-example" of the swagger(also the method `example()`
of the swagger-core jar.
This is the first commit to fix this problem, which add the
unit test for it.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 87.973% when pulling 1beac05 on shardings:add_request_example_support into 70bf170 on Swagger2Markup:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 87.968% when pulling 244b602 on shardings:add_request_example_support into 70bf170 on Swagger2Markup:master.

@shardings
Copy link
Contributor Author

@RobWin codacy shows it had two duplication in unit test. It's OK?

@RobWin
Copy link
Member

RobWin commented Mar 16, 2017

Yes, that's fine for me.
You are done?

@shardings
Copy link
Contributor Author

shardings commented Mar 16, 2017

Yeah~ It's done. @RobWin

@RobWin RobWin merged commit f107779 into Swagger2Markup:master Mar 16, 2017
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

Successfully merging this pull request may close these issues.

3 participants