Skip to content

Conversation

@Angeluz-07
Copy link
Contributor

Examples have been added to make the swagger docs more expressive, with the help of the library Faker.

Check #26 for details.

Also I included two fixes in code such as :

  • rename some variables called uid to id for consistency
  • rename a typo in a file name.

title='Creator',
max_length=64,
description='User that created it',
example=faker.uuid4()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add trailing comas

title='Project',
max_length=64,
description='The id of the selected project',
example=faker.uuid4()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, the ids that are stored in the database are going to be integers because that is how SQL databases do it. So let's keep the ids as random integers of 4 digits maximum, at least for now. Later when we start doing migrations to uuid we do the change, but the representation has to be truth to real.

title='Is it running?',
description='Whether this time entry is currently running or not'
description='Whether this time entry is currently running or not',
example=faker.boolean()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, running has to be true if the end_date has no value. I think that end_date has to have a value or not.

@Angeluz-07 Angeluz-07 merged commit 9e598c4 into master Mar 17, 2020
@Angeluz-07 Angeluz-07 deleted the feature/add-examples-in-swagger#26 branch April 6, 2020 21:56
@Angeluz-07 Angeluz-07 restored the feature/add-examples-in-swagger#26 branch April 6, 2020 21:56
@Angeluz-07 Angeluz-07 deleted the feature/add-examples-in-swagger#26 branch April 6, 2020 21:56
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