Skip to content

Commit

Permalink
#19 Add Version validator (3)
Browse files Browse the repository at this point in the history
update docs
  • Loading branch information
dostuffthatmatters committed Aug 7, 2024
1 parent a335b91 commit 06e38a8
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions docs/pages/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1013,3 +1013,30 @@ m = MyModel.model_validate(
) # does not raise an error
```


## `Version` Objects

```python
class Version(pydantic.RootModel[str])
```

A version string in the format of MAJOR.MINOR.PATCH[-(alpha|beta|rc).N]


##### `as_tag`

```python
def as_tag() -> str
```

Return the version string as a tag, i.e. vMAJOR.MINOR.PATCH...


##### `as_identifier`

```python
def as_identifier() -> str
```

Return the version string as a number, i.e. MAJOR.MINOR.PATCH...

0 comments on commit 06e38a8

Please sign in to comment.